aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_linux_config.h
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2014-05-23 16:37:05 +0400
committerRuslan Ermilov <ru@nginx.com>2014-05-23 16:37:05 +0400
commit5c170306718a8fe5f606f7bdd2d492a54c1cf0ce (patch)
tree0d7c14c86d7186f9dc5779a04ae8a532d9295883 /src/os/unix/ngx_linux_config.h
parent3e279a8eb492ff903ccc46cf03bbd95a30a7dcf1 (diff)
downloadnginx-5c170306718a8fe5f606f7bdd2d492a54c1cf0ce.tar.gz
nginx-5c170306718a8fe5f606f7bdd2d492a54c1cf0ce.zip
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.
Diffstat (limited to 'src/os/unix/ngx_linux_config.h')
-rw-r--r--src/os/unix/ngx_linux_config.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os/unix/ngx_linux_config.h b/src/os/unix/ngx_linux_config.h
index 72594bac0..c6c02c93e 100644
--- 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, int32_t *offset, size_t size);
#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;