On Fri, Sep 14, 2012 at 01:00:43PM +0000, Dag-Erling Sm�rgrav wrote:
> Author: des
> Date: Fri Sep 14 13:00:43 2012
> New Revision: 240496
> URL: http://svn.freebsd.org/changeset/base/240496
> 
> Log:
>   Use libmd if and only if OpenSSL is not available.
>   
>   PR:         bin/171402
>   MFC after:  3 days
> 
> Modified:
>   head/lib/libfetch/Makefile
>   head/lib/libfetch/http.c
>   head/usr.bin/fetch/Makefile
> 
> Modified: head/lib/libfetch/Makefile
> ==============================================================================
> --- head/lib/libfetch/Makefile        Fri Sep 14 12:15:13 2012        
> (r240495)
> +++ head/lib/libfetch/Makefile        Fri Sep 14 13:00:43 2012        
> (r240496)
> @@ -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: head/lib/libfetch/http.c
> ==============================================================================
> --- head/lib/libfetch/http.c  Fri Sep 14 12:15:13 2012        (r240495)
> +++ head/lib/libfetch/http.c  Fri Sep 14 13:00:43 2012        (r240496)
> @@ -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>
> 
> Modified: head/usr.bin/fetch/Makefile
> ==============================================================================
> --- head/usr.bin/fetch/Makefile       Fri Sep 14 12:15:13 2012        
> (r240495)
> +++ head/usr.bin/fetch/Makefile       Fri Sep 14 13:00:43 2012        
> (r240496)
> @@ -4,11 +4,12 @@
>  
>  PROG=                fetch
>  CSTD?=               c99
> +.if ${MK_OPENSSL} != "no"
> +DPADD=               ${LIBFETCH} ${LIBSSL} ${LIBCRYPTO}
> +LDADD=               -lfetch -lssl -lcrypto
> +.else
>  DPADD=               ${LIBFETCH} ${LIBMD}
>  LDADD=               -lfetch -lmd
> -.if ${MK_OPENSSL} != "no"
> -DPADD+=              ${LIBSSL} ${LIBCRYPTO}
> -LDADD+=              -lssl -lcrypto
>  .endif
>  
>  .include <bsd.prog.mk>

Do you plan to push it to 9.1, that will help having pkgng linked against libmd.

regards,
Bapt

Attachment: pgp9davHeHdEE.pgp
Description: PGP signature

Reply via email to