The following change to samba breaks building lib/crypto/md5.* on OpenBSD as it pulls in the /usr/include/m5.h file. diff -u -r --new-file --exclude .svn --exclude CVS samba-3.6.6//lib/crypto/md5.h samba-3.6.7//lib/crypto/md5.h --- samba-3.6.6//lib/crypto/md5.h 2012-06-24 19:21:16.000000000 +0200 +++ samba-3.6.7//lib/crypto/md5.h 2012-07-30 19:13:16.000000000 +0200 @@ -5,15 +5,27 @@ #define HEADER_MD5_H #endif +#ifdef HAVE_MD5_H +/* + * Try to avoid clashes with Solaris MD5 implementation. + * ...where almost all implementations follows: + * "Schneier's Cryptography Classics Library" + */ +#include <md5.h> +#else + struct MD5Context { uint32_t buf[4]; uint32_t bits[2]; uint8_t in[64]; }; +typedef struct MD5Context MD5_CTX; void MD5Init(struct MD5Context *context); void MD5Update(struct MD5Context *context, const uint8_t *buf, size_t len); void MD5Final(uint8_t digest[16], struct MD5Context *context); +#endif /* !HAVE_MD5_H */ + #endif /* !MD5_H */ cc -O2 -pipe -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I. -I/usr/ports/pobj/samba-3.6.7/samba-3.6.7/source3 -I/usr/ports/pobj/samba-3.6.7/samba-3.6.7/source3/../lib/iniparser/src -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./librpc -I./.. -DHAVE_CONFIG_H -I/usr/local/include -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./librpc -I./.. -I./../lib/popt -I/usr/ports/pobj/samba-3.6.7/samba-3.6.7/source3/lib -I.. -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3 -fPIC -c ../lib/crypto/md5.c -o ../lib/crypto/md5.o ../lib/crypto/md5.c:26: error: conflicting types for 'MD5Transform' /usr/include/md5.h:39: error: previous declaration of 'MD5Transform' was here ../lib/crypto/md5.c: In function 'MD5Init': ../lib/crypto/md5.c:48: error: 'struct MD5Context' has no member named 'buf' ../lib/crypto/md5.c:49: error: 'struct MD5Context' has no member named 'buf' ../lib/crypto/md5.c:50: error: 'struct MD5Context' has no member named 'buf' ../lib/crypto/md5.c:51: error: 'struct MD5Context' has no member named 'buf' ../lib/crypto/md5.c:53: error: 'struct MD5Context' has no member named 'bits' ../lib/crypto/md5.c:54: error: 'struct MD5Context' has no member named 'bits' ../lib/crypto/md5.c: In function 'MD5Update': ../lib/crypto/md5.c:67: error: 'struct MD5Context' has no member named 'bits' ../lib/crypto/md5.c:68: error: 'struct MD5Context' has no member named 'bits' ../lib/crypto/md5.c:69: error: 'struct MD5Context' has no member named 'bits' ../lib/crypto/md5.c:70: error: 'struct MD5Context' has no member named 'bits' ../lib/crypto/md5.c:77: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:85: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:86: error: 'struct MD5Context' has no member named 'buf' ../lib/crypto/md5.c:86: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:93: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:94: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:95: error: 'struct MD5Context' has no member named 'buf' ../lib/crypto/md5.c:95: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:102: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c: In function 'MD5Final': ../lib/crypto/md5.c:115: error: 'struct MD5Context' has no member named 'bits' ../lib/crypto/md5.c:119: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:129: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:130: error: 'struct MD5Context' has no member named 'buf' ../lib/crypto/md5.c:130: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:133: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:138: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:141: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:141: error: 'struct MD5Context' has no member named 'bits' ../lib/crypto/md5.c:142: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:142: error: 'struct MD5Context' has no member named 'bits' ../lib/crypto/md5.c:144: error: 'struct MD5Context' has no member named 'buf' ../lib/crypto/md5.c:144: error: 'struct MD5Context' has no member named 'in' ../lib/crypto/md5.c:145: error: 'struct MD5Context' has no member named 'buf' ../lib/crypto/md5.c:146: error: 'struct MD5Context' has no member named 'buf' gmake: *** [../lib/crypto/md5.o] Error 1 *** Error code 2 Stop in /usr/mystuff/net/samba (line 2496 of /usr/ports/infrastructure/mk/bsd.port.mk). *** Error code 1
*** This bug has been marked as a duplicate of bug 9086 ***