Browse Source

nginx: add upstream patch fixing to only include sys/sysctl.h when really needed

stable/0.6
Christian Wiese 11 years ago
parent
commit
96aa569b64
  1. 65
      network/nginx/nginx-rtsig-sysctl.patch

65
network/nginx/nginx-rtsig-sysctl.patch

@ -0,0 +1,65 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../nginx/nginx-rtsig-sysctl.patch
# Copyright (C) 2014 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
In OpenSDE we need this patch to be able to build with musl libc which
is not shipping with <sys/sysctl.h> anymore because the usage of the
interface is discouraged by the linux kernel folks.
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1372247247 -14400
# Node ID 7f4ec5bfb715e6271179321286828c86210eb5ba
# Parent 7ecaa9e4bf1bcf7ecd25f1d5f4c8a778de2db534
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.
diff -r 7ecaa9e4bf1b -r 7f4ec5bfb715 src/os/unix/ngx_linux_config.h
--- a/src/os/unix/ngx_linux_config.h Thu Jun 20 20:47:39 2013 +0400
+++ b/src/os/unix/ngx_linux_config.h Wed Jun 26 15:47:27 2013 +0400
@@ -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 @@
#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
Loading…
Cancel
Save