Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed build on Linux with x32 ABI.

Maxim Dounin
June 26, 2013 08:34AM
details: http://hg.nginx.org/nginx/rev/7f4ec5bfb715
branches:
changeset: 5255:7f4ec5bfb715
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Jun 26 15:47:27 2013 +0400
description:
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:

src/os/unix/ngx_linux_config.h | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff --git a/src/os/unix/ngx_linux_config.h b/src/os/unix/ngx_linux_config.h
--- 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,11 +76,17 @@ extern ssize_t sendfile(int s, int fd, i
#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
+
+
#if (NGX_HAVE_EPOLL)
#include <sys/epoll.h>
#endif

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Fixed build on Linux with x32 ABI.

Maxim Dounin 1109 June 26, 2013 08:34AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 109
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready