Index: libaio-0.3.109/harness/cases/16.t =================================================================== --- libaio-0.3.109.orig/harness/cases/16.t +++ libaio-0.3.109/harness/cases/16.t @@ -20,7 +20,7 @@ #define SYS_eventfd 478 #elif defined(__aarch64__) #define SYS_eventfd 1044 -#else +#elif !defined(SYS_eventfd2) #error define SYS_eventfd for your arch! #endif #endif @@ -41,7 +41,11 @@ int test_main(void) struct timespec notime = { .tv_sec = 0, .tv_nsec = 0 }; buf = malloc(SIZE); assert(buf); +#ifndef SYS_eventfd + efd = syscall(SYS_eventfd2, 0, 0); +#else efd = syscall(SYS_eventfd, 0); +#endif if (efd < 0) { if (errno == ENOSYS) { printf("No eventfd support. [SKIPPING]\n"); Index: libaio-0.3.109/src/libaio.h =================================================================== --- libaio-0.3.109.orig/src/libaio.h +++ libaio-0.3.109/src/libaio.h @@ -127,6 +127,10 @@ typedef enum io_iocb_cmd { #define PADDEDptr(x, y) x #define PADDEDul(x, y) unsigned long x # endif +#elif defined(__riscv) +#define PADDED(x, y) x, y +#define PADDEDptr(x, y) x +#define PADDEDul(x, y) unsigned long x #else #error endian? #endif