xref: /OK3568_Linux_fs/buildroot/package/nginx/0009-auto-os-linux-fix-build-with-libxcrypt.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom 79f1fe5251afc4e22a138b0c8f44fc9c94093b8b Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3*4882a593SmuzhiyunDate: Fri, 2 Apr 2021 09:18:26 +0200
4*4882a593SmuzhiyunSubject: [PATCH] auto/os/linux: fix build with libxcrypt
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunIf crypt_r is found in libcrypt, add -lcrypt to CORE_LIBS to avoid the
7*4882a593Smuzhiyunfollowing build failure with libxcrypt:
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunobjs/ngx_modules.o \
10*4882a593Smuzhiyun-lpcre -L/home/giuliobenetti/autobuild/run/instance-3/output-1/host/bin/../xtensa-buildroot-linux-uclibc/sysroot/usr/lib -lssl -lcrypto -L/home/giuliobenetti/autobuild/run/instance-3/output-1/host/bin/../xtensa-buildroot-linux-uclibc/sysroot/usr/lib -lxslt -lxml2 -lGeoIP \
11*4882a593Smuzhiyun-Wl,-E
12*4882a593Smuzhiyun/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/9.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: objs/src/os/unix/ngx_user.o:/home/giuliobenetti/autobuild/run/instance-3/output-1/build/nginx-1.18.0/src/os/unix/ngx_user.c:18: undefined reference to `crypt_r'
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunFixes:
15*4882a593Smuzhiyun - http://autobuild.buildroot.org/results/79a51b0d348e756517b5c9ce815a67f5c657e7e6
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
18*4882a593Smuzhiyun---
19*4882a593Smuzhiyun auto/os/linux | 3 +++
20*4882a593Smuzhiyun 1 file changed, 3 insertions(+)
21*4882a593Smuzhiyun
22*4882a593Smuzhiyundiff --git a/auto/os/linux b/auto/os/linux
23*4882a593Smuzhiyunindex 5e280eca..04682812 100644
24*4882a593Smuzhiyun--- a/auto/os/linux
25*4882a593Smuzhiyun+++ b/auto/os/linux
26*4882a593Smuzhiyun@@ -232,6 +232,9 @@ ngx_feature_test="struct crypt_data  cd;
27*4882a593Smuzhiyun                   crypt_r(\"key\", \"salt\", &cd);"
28*4882a593Smuzhiyun . auto/feature
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun+if [ $ngx_found = yes ]; then
31*4882a593Smuzhiyun+    CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
32*4882a593Smuzhiyun+fi
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun ngx_include="sys/vfs.h";     . auto/include
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun--
37*4882a593Smuzhiyun2.30.2
38*4882a593Smuzhiyun
39