diff --git a/src/linux/platform.h b/src/linux/platform.h index 8fba541d..af955deb 100644 --- a/src/linux/platform.h +++ b/src/linux/platform.h @@ -26,7 +26,11 @@ struct filter; #if HAVE_SYS_EVENTFD_H # include #else +#ifdef DARLING +# define eventfd(a,b) __linux_syscall_2args(SYS_eventfd, (a), (b)) +#else // !DARLING # define eventfd(a,b) syscall(SYS_eventfd, (a), (b)) +#endif static inline int eventfd_write(int fd, uint64_t val) { if (write(fd, &val, sizeof(val)) < (ssize_t) sizeof(val)) @@ -44,7 +48,6 @@ struct filter; */ #ifdef DARLING #include -# define syscall __linux_syscall #else # define _GNU_SOURCE # include