]> git.kaiwu.me - nginx.git/commitdiff
Fixed build on Linux with x32 ABI.
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 26 Jun 2013 11:47:27 +0000 (15:47 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 26 Jun 2013 11:47:27 +0000 (15:47 +0400)
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

index 2834032dea07a1a02ccb3ef750a9f35ffd34b386..8467a97fec95675884a75d28bb3a59f95eba44f1 100644 (file)
@@ -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