aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2013-06-26 15:47:27 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2013-06-26 15:47:27 +0400
commit982f4de9f03c56bc96cc6da6113ede6c1643c1e7 (patch)
tree642e4a97e3804ffdb353494bf5acd28b5719c7ef /src
parent11ff177a9fe3129cd1c8b23e1850bfbc3e2c6ae1 (diff)
downloadnginx-982f4de9f03c56bc96cc6da6113ede6c1643c1e7.tar.gz
nginx-982f4de9f03c56bc96cc6da6113ede6c1643c1e7.zip
Fixed build on Linux with x32 ABI.
On Linux x32 inclusion of sys/sysctl.h produces an error. As sysctl() is only used by rtsig event method code, which is legacy and not compiled in by default on modern linuxes, the sys/sysctl.h file now only included if rtsig support is enabled. Based on patch by Serguei I. Ivantsov.
Diffstat (limited to 'src')
-rw-r--r--src/os/unix/ngx_linux_config.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/os/unix/ngx_linux_config.h b/src/os/unix/ngx_linux_config.h
index 2834032de..8467a97fe 100644
--- a/src/os/unix/ngx_linux_config.h
+++ b/src/os/unix/ngx_linux_config.h
@@ -51,7 +51,6 @@
#include <malloc.h> /* memalign() */
#include <limits.h> /* IOV_MAX */
#include <sys/ioctl.h>
-#include <sys/sysctl.h>
#include <crypt.h>
#include <sys/utsname.h> /* uname() */
@@ -77,8 +76,14 @@ extern ssize_t sendfile(int s, int fd, int32_t *offset, size_t size);
#endif
-#if (NGX_HAVE_POLL || NGX_HAVE_RTSIG)
+#if (NGX_HAVE_POLL)
+#include <poll.h>
+#endif
+
+
+#if (NGX_HAVE_RTSIG)
#include <poll.h>
+#include <sys/sysctl.h>
#endif