Author: des
Date: Mon Nov  5 10:42:31 2012
New Revision: 242606
URL: http://svnweb.freebsd.org/changeset/base/242606

Log:
  MFH (r240496): use libmd if and only if OpenSSL is not available

Modified:
  stable/9/lib/libfetch/Makefile
  stable/9/lib/libfetch/http.c
Directory Properties:
  stable/9/lib/libfetch/   (props changed)

Modified: stable/9/lib/libfetch/Makefile
==============================================================================
--- stable/9/lib/libfetch/Makefile      Mon Nov  5 09:45:37 2012        
(r242605)
+++ stable/9/lib/libfetch/Makefile      Mon Nov  5 10:42:31 2012        
(r242606)
@@ -16,8 +16,8 @@ CFLAGS+=      -DINET6
 
 .if ${MK_OPENSSL} != "no"
 CFLAGS+=       -DWITH_SSL
-DPADD=         ${LIBSSL} ${LIBCRYPTO} ${LIBMD}
-LDADD=         -lssl -lcrypto -lmd
+DPADD=         ${LIBSSL} ${LIBCRYPTO}
+LDADD=         -lssl -lcrypto
 .else
 DPADD=         ${LIBMD}
 LDADD=         -lmd

Modified: stable/9/lib/libfetch/http.c
==============================================================================
--- stable/9/lib/libfetch/http.c        Mon Nov  5 09:45:37 2012        
(r242605)
+++ stable/9/lib/libfetch/http.c        Mon Nov  5 10:42:31 2012        
(r242606)
@@ -76,7 +76,15 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
+
+#ifdef WITH_SSL
+#include <openssl/md5.h>
+#define MD5Init(c) MD5_Init(c)
+#define MD5Update(c, data, len) MD5_Update(c, data, len)
+#define MD5Final(md, c) MD5_Final(md, c)
+#else
 #include <md5.h>
+#endif
 
 #include <netinet/in.h>
 #include <netinet/tcp.h>
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to