diff options
author | Johannes Nixdorf | 2019-01-22 19:17:55 +0100 |
---|---|---|
committer | Karel Zak | 2019-01-23 12:20:47 +0100 |
commit | 70c364b4db6530ada12f7103b5c5d8ceb777307f (patch) | |
tree | 2a6b1a462002ac24e9e13391b0379a5a9eaca5b2 /configure.ac | |
parent | logger: concatenate multiple lines of MESSAGE into a single field. (diff) | |
download | kernel-qcow2-util-linux-70c364b4db6530ada12f7103b5c5d8ceb777307f.tar.gz kernel-qcow2-util-linux-70c364b4db6530ada12f7103b5c5d8ceb777307f.tar.xz kernel-qcow2-util-linux-70c364b4db6530ada12f7103b5c5d8ceb777307f.zip |
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>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 4 insertions, 1 deletions
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 |