diff src/os/unix/ngx_linux_config.h @ 5707:31dd63dcb9ea

Events: use eventfd() instead of syscall(SYS_eventfd) if possible. This fixes --with-file-aio support on systems that lack eventfd() syscall, notably aarch64 Linux. The syscall(SYS_eventfd) may still be necessary on systems that have eventfd() syscall in the kernel but lack it in glibc, e.g. as seen in the current CentOS 5 release.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 23 May 2014 16:37:05 +0400
parents 72e31d88defa
children 466bd63b63d1
line wrap: on
line diff
--- a/src/os/unix/ngx_linux_config.h
+++ b/src/os/unix/ngx_linux_config.h
@@ -94,6 +94,9 @@ extern ssize_t sendfile(int s, int fd, i
 
 
 #if (NGX_HAVE_FILE_AIO)
+#if (NGX_HAVE_SYS_EVENTFD_H)
+#include <sys/eventfd.h>
+#endif
 #include <sys/syscall.h>
 #include <linux/aio_abi.h>
 typedef struct iocb  ngx_aiocb_t;