void-packages/srcpkgs/util-linux/patches/fix-crypt-detection.patch

37 lines
923 B
Diff

From 70c364b4db6530ada12f7103b5c5d8ceb777307f Mon Sep 17 00:00:00 2001
From: Johannes Nixdorf <mixi@shadowice.org>
Date: Tue, 22 Jan 2019 19:17:55 +0100
Subject: build-sys: fix crypt() detection without -lcrypt
The check tested whether code using crypt() links without -lcrypt, but
didn't set have_crypt to yes if it succeeded.
This fixes the check erroneously failing when compiling against musl
libc.
Signed-off-by: Johannes Nixdorf <mixi@shadowice.org>
---
configure.ac | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 4c8de521f..0bf422cda 100644
--- configure.ac
+++ configure.ac
@@ -798,7 +798,10 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#endif
]], [[
char *c = crypt("abc","pw");
-]])],[],[
+]])],[
+ have_libcrypt=no
+ have_crypt=yes
+],[
LIBS="$LIBS -lcrypt"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_CRYPT_H
--
cgit 1.2-0.3.lf.el7