]> git.samba.org - samba.git/commitdiff
Don't assume crypt.h is present even if crypt() is.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 20 Oct 2008 08:38:03 +0000 (10:38 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 20 Oct 2008 08:38:03 +0000 (10:38 +0200)
lib/replace/crypt.m4
lib/replace/replace.h

index 0b31ae49645d9f076a870cb5d9232338348e5984..047766d47053e809de82e27d55e09d793a2c15c3 100644 (file)
@@ -1,5 +1,6 @@
 ###############################################
 # test for where we get crypt() from
+AC_CHECK_HEADERS(crypt.h)
 AC_SEARCH_LIBS_EXT(crypt, [crypt],
   [test "$ac_cv_search_crypt" = "none required" || CRYPT_LIBS="-lcrypt"
   AC_DEFINE(HAVE_CRYPT,1,[Whether the system has the crypt() function])],
index 57ebeb5d2f09dfa02b43a1259dbdd2cae789c3d3..af1208a8fc286d52e89fd75d8d75982f65f12d17 100644 (file)
@@ -632,7 +632,9 @@ typedef int bool;
 char *ufc_crypt(const char *key, const char *salt);
 #define crypt ufc_crypt
 #else
+#ifdef HAVE_CRYPT_H
 #include <crypt.h>
 #endif
+#endif
 
 #endif /* _LIBREPLACE_REPLACE_H */