Browse Source

nginx: fix musl compatibility

 - include Patches according to issue #1129
 - refresh Makefile

Signed-off-by: heil <heil@terminal-consulting.de>
heil 9 years ago
parent
commit
9433d5ad28
2 changed files with 37 additions and 2 deletions
  1. 2
    2
      net/nginx/Makefile
  2. 35
    0
      net/nginx/patches/100-musl-no-sysctl.patch

+ 2
- 2
net/nginx/Makefile View File

@@ -1,5 +1,5 @@
1 1
 #
2
-# Copyright (C) 2009-2012 OpenWrt.org
2
+# Copyright (C) 2012-2015 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=nginx
11 11
 PKG_VERSION:=1.4.7
12
-PKG_RELEASE:=2
12
+PKG_RELEASE:=3
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 15
 PKG_SOURCE_URL:=http://nginx.org/download/

+ 35
- 0
net/nginx/patches/100-musl-no-sysctl.patch View File

@@ -0,0 +1,35 @@
1
+Index: nginx-1.4.7/src/os/unix/ngx_linux_config.h
2
+===================================================================
3
+--- nginx-1.4.7.orig/src/os/unix/ngx_linux_config.h
4
++++ nginx-1.4.7/src/os/unix/ngx_linux_config.h
5
+@@ -51,7 +51,6 @@
6
+ #include <malloc.h>             /* memalign() */
7
+ #include <limits.h>             /* IOV_MAX */
8
+ #include <sys/ioctl.h>
9
+-#include <sys/sysctl.h>
10
+ #include <crypt.h>
11
+ #include <sys/utsname.h>        /* uname() */
12
+
13
+--- nginx-1.2.7/src/os/unix/ngx_user.c
14
++++ nginx-1.2.7-patched/src/os/unix/ngx_user.c
15
+@@ -31,8 +31,6 @@
16
+     struct crypt_data   cd;
17
+ 
18
+     cd.initialized = 0;
19
+-    /* work around the glibc bug */
20
+-    cd.current_salt[0] = ~salt[0];
21
+ 
22
+     value = crypt_r((char *) key, (char *) salt, &cd);
23
+
24
+diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf
25
+index 528ee17..73ef359 100644
26
+--- a/auto/lib/openssl/conf
27
++++ b/auto/lib/openssl/conf
28
+@@ -47,7 +47,7 @@ else
29
+         ngx_feature_run=no
30
+         ngx_feature_incs="#include <openssl/ssl.h>"
31
+         ngx_feature_path=
32
+-        ngx_feature_libs="-lssl -lcrypto"
33
++        ngx_feature_libs="-lssl -lcrypto -lz"
34
+         ngx_feature_test="SSL_library_init()"
35
+         . auto/feature