mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
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.
This commit is contained in:
parent
11ff177a9f
commit
982f4de9f0
@ -51,7 +51,6 @@
|
|||||||
#include <malloc.h> /* memalign() */
|
#include <malloc.h> /* memalign() */
|
||||||
#include <limits.h> /* IOV_MAX */
|
#include <limits.h> /* IOV_MAX */
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/sysctl.h>
|
|
||||||
#include <crypt.h>
|
#include <crypt.h>
|
||||||
#include <sys/utsname.h> /* uname() */
|
#include <sys/utsname.h> /* uname() */
|
||||||
|
|
||||||
@ -77,11 +76,17 @@ extern ssize_t sendfile(int s, int fd, int32_t *offset, size_t size);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if (NGX_HAVE_POLL || NGX_HAVE_RTSIG)
|
#if (NGX_HAVE_POLL)
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if (NGX_HAVE_RTSIG)
|
||||||
|
#include <poll.h>
|
||||||
|
#include <sys/sysctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if (NGX_HAVE_EPOLL)
|
#if (NGX_HAVE_EPOLL)
|
||||||
#include <sys/epoll.h>
|
#include <sys/epoll.h>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user