libaio/libaio-aarch64-support.diff
Dirk Mueller ae1239fdcb - Add libaio-aarch64-support.diff:
* add support for aarch64
- Add libaio-generic-arch.diff:
  * support all archtes (also aarch64)

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libaio?expand=0&rev=23
2013-03-01 08:27:36 +00:00

35 lines
1018 B
Diff

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