From 982f4de9f03c56bc96cc6da6113ede6c1643c1e7 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Wed, 26 Jun 2013 15:47:27 +0400 Subject: 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. --- src/os/unix/ngx_linux_config.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/os/unix/ngx_linux_config.h') 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 /* memalign() */ #include /* IOV_MAX */ #include -#include #include #include /* 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 +#endif + + +#if (NGX_HAVE_RTSIG) #include +#include #endif -- cgit v1.2.3