You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.0 KiB
65 lines
2.0 KiB
# --- 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 |
|
|
|
|