File libaio-aarch64-support.diff of Package libaio

Index: harness/cases/16.t
===================================================================
--- harness/cases/16.t.orig
+++ harness/cases/16.t
@@ -18,6 +18,8 @@
 #define SYS_eventfd 318
 #elif defined(__alpha__)
 #define SYS_eventfd 478
+#elif defined(__aarch64__)
+#define SYS_eventfd 1044
 #else
 #error define SYS_eventfd for your arch!
 #endif
Index: src/libaio.h
===================================================================
--- src/libaio.h.orig
+++ src/libaio.h
@@ -117,6 +117,16 @@ typedef enum io_iocb_cmd {
 #define PADDEDptr(x, y)	x; unsigned y
 #define PADDEDul(x, y)	unsigned long x; unsigned y
 #  endif
+#elif defined(__aarch64__)
+#  if defined (__AARCH64EB__) /* big endian, 64 bits */
+#define PADDED(x, y)    unsigned y; x
+#define PADDEDptr(x,y)  x
+#define PADDEDul(x, y)  unsigned long x
+#  elif defined(__AARCH64EL__) /* little endian, 64 bits */
+#define PADDED(x, y)    x, y
+#define PADDEDptr(x, y) x
+#define PADDEDul(x, y)  unsigned long x
+#  endif
 #else
 #error	endian?
 #endif