Blame SOURCES/libaio-arm64-fix-test-case-16.patch

8b4eb7
diff -up libaio-0.3.109/harness/cases/16.t.orig libaio-0.3.109/harness/cases/16.t
8b4eb7
--- libaio-0.3.109/harness/cases/16.t.orig	2009-10-09 14:17:02.000000000 -0400
8b4eb7
+++ libaio-0.3.109/harness/cases/16.t	2014-03-13 10:36:34.221544281 -0400
8b4eb7
@@ -18,6 +18,12 @@
8b4eb7
 #define SYS_eventfd 318
8b4eb7
 #elif defined(__alpha__)
8b4eb7
 #define SYS_eventfd 478
8b4eb7
+#elif defined(__aarch64__)
8b4eb7
+/* arm64 does not implement eventfd, only eventfd2 */
8b4eb7
+#define USE_EVENTFD2
8b4eb7
+#ifndef SYS_eventfd2
8b4eb7
+#define SYS_eventfd2 19
8b4eb7
+#endif /* __aarch64__ */
8b4eb7
 #else
8b4eb7
 #error define SYS_eventfd for your arch!
8b4eb7
 #endif
8b4eb7
@@ -39,7 +45,11 @@ int test_main(void)
8b4eb7
 	struct timespec	notime = { .tv_sec = 0, .tv_nsec = 0 };
8b4eb7
 
8b4eb7
 	buf = malloc(SIZE);				assert(buf);
8b4eb7
+#ifndef USE_EVENTFD2
8b4eb7
 	efd = syscall(SYS_eventfd, 0);
8b4eb7
+#else
8b4eb7
+	efd = syscall(SYS_eventfd2, 0, 0);
8b4eb7
+#endif
8b4eb7
 	if (efd < 0) {
8b4eb7
 		if (errno == ENOSYS) {
8b4eb7
 			printf("No eventfd support.  [SKIPPING]\n");