* [PATCH] build-sys: fix crypt() detection without -lcrypt
@ 2019-01-22 18:17 Johannes Nixdorf
2019-01-23 11:24 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Nixdorf @ 2019-01-22 18:17 UTC (permalink / raw)
To: util-linux; +Cc: Johannes Nixdorf
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
--- a/configure.ac
+++ b/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
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] build-sys: fix crypt() detection without -lcrypt
2019-01-22 18:17 [PATCH] build-sys: fix crypt() detection without -lcrypt Johannes Nixdorf
@ 2019-01-23 11:24 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2019-01-23 11:24 UTC (permalink / raw)
To: Johannes Nixdorf; +Cc: util-linux
On Tue, Jan 22, 2019 at 07:17:55PM +0100, Johannes Nixdorf wrote:
> configure.ac | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, back to index
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 18:17 [PATCH] build-sys: fix crypt() detection without -lcrypt Johannes Nixdorf
2019-01-23 11:24 ` Karel Zak
Util-Linux Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
util-linux@vger.kernel.org util-linux@archiver.kernel.org
public-inbox-index util-linux
Newsgroup available over NNTP:
nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux
AGPL code for this site: git clone https://public-inbox.org/ public-inbox