[PATCH] Configure: link libcrypt when a feature using it is detected

Piotr Sikora piotr at aviatrix.com
Wed Feb 28 01:23:19 UTC 2024


# HG changeset patch
# User Piotr Sikora <piotr at aviatrix.com>
# Date 1708977638 0
#      Mon Feb 26 20:00:38 2024 +0000
# Branch patch014
# Node ID 570e97dddeeddb79c71587aa8a10150b64404beb
# Parent  cdc173477ea99fd6c952a85e5cd11db66452076a
Configure: link libcrypt when a feature using it is detected.

Previously, this worked only because libcrypt was added in a separate
test for crypt() in auto/unix.

Signed-off-by: Piotr Sikora <piotr at aviatrix.com>

diff -r cdc173477ea9 -r 570e97dddeed auto/os/linux
--- a/auto/os/linux	Mon Feb 26 20:00:37 2024 +0000
+++ b/auto/os/linux	Mon Feb 26 20:00:38 2024 +0000
@@ -228,6 +228,10 @@
                   crypt_r(\"key\", \"salt\", &cd);"
 . auto/feature
 
+if [ $ngx_found = yes ]; then
+    CRYPT_LIB="-lcrypt"
+fi
+
 
 ngx_include="sys/vfs.h";     . auto/include
 


More information about the nginx-devel mailing list