diff options
author | Andrew Bartlett <abartlet@samba.org> | 2013-05-22 00:14:19 +1000 |
---|---|---|
committer | Richard Sharpe <sharpe@samba.org> | 2013-05-22 10:06:40 +0200 |
commit | 30a224367595f9e2506e41053fc9c7cb96a90928 (patch) | |
tree | 0deb2b11be00fea6c1eead145c716e06137b036a /lib/crypto/md5.h | |
parent | 27df444d0b92a8acb4d830b3b62f04835b57f0e8 (diff) | |
download | samba-30a224367595f9e2506e41053fc9c7cb96a90928.tar.gz samba-30a224367595f9e2506e41053fc9c7cb96a90928.tar.bz2 samba-30a224367595f9e2506e41053fc9c7cb96a90928.zip |
build: Update md5.h detection in waf and autoconf to use sys/md5.h and -lmd
This brings the two build systems in sync, without using md5.h (which is a problem name)
Tested on FreeBSD
Andrew Bartlett
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Wed May 22 10:06:40 CEST 2013 on sn-devel-104
Diffstat (limited to 'lib/crypto/md5.h')
-rw-r--r-- | lib/crypto/md5.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/crypto/md5.h b/lib/crypto/md5.h index 388cdf83f0..edae27f65b 100644 --- a/lib/crypto/md5.h +++ b/lib/crypto/md5.h @@ -6,12 +6,16 @@ #define HEADER_MD5_H #endif -#ifdef HAVE_BSD_MD5_H -/* Try to avoid clashes with BSD MD5 implementation */ +#if defined(HAVE_BSD_MD5_H) +/* Try to avoid clashes with BSD MD5 implementation (on linux) */ #include <bsd/md5.h> -#else + +#elif defined(HAVE_SYS_MD5_H) +/* Try to avoid clashes with BSD MD5 implementation (on BSD) */ +#include <sys/md5.h> + /* Try to use CommonCrypto on Mac as otherwise we can get MD5Final twice */ -#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H +#elif defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) #include <CommonCrypto/CommonDigest.h> #define MD5Init(c) CC_MD5_Init(c) @@ -32,8 +36,6 @@ void MD5Init(MD5_CTX *context); void MD5Update(MD5_CTX *context, const uint8_t *buf, size_t len); void MD5Final(uint8_t digest[MD5_DIGEST_LENGTH], MD5_CTX *context); -#endif /* HAVE_COMMONCRYPTO_COMMONDIGEST_H */ - -#endif /* HAVE_BSD_MD5_H */ +#endif /* HAVE_*MD5_H */ #endif /* !MD5_H */ |