* [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 related [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, other threads:[~2019-01-23 11:24 UTC | newest]
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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.