From: Jelmer Vernooij Date: Mon, 20 Oct 2008 08:38:03 +0000 (+0200) Subject: Don't assume crypt.h is present even if crypt() is. X-Git-Tag: samba-4.0.0alpha6~778^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=620a27bdf140e5e9091cc922f62b6fd12b12330e;p=thirdparty%2Fsamba.git Don't assume crypt.h is present even if crypt() is. --- diff --git a/lib/replace/crypt.m4 b/lib/replace/crypt.m4 index 0b31ae49645..047766d4705 100644 --- a/lib/replace/crypt.m4 +++ b/lib/replace/crypt.m4 @@ -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])], diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 57ebeb5d2f0..af1208a8fc2 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -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 #endif +#endif #endif /* _LIBREPLACE_REPLACE_H */