From 398e09896a073bed0b23e5a1f51d2ca561de8f31 Mon Sep 17 00:00:00 2001 From: thomas Date: Sun, 10 May 2015 13:21:36 +0000 Subject: Ensure libmd symbols do not clash with libcrypto Add a prefix to all symbols in libmd to avoid incompatibilites with same-named, but not binary compatible, symbols from libcrypto. Also introduce Weak aliases to avoid the need to rebuild dependent binaries and a major version bump. PR: 199119 Differential Revision: D2216 Reviewed by: roberto, delphij MFC after: 2 weeks --- lib/libmd/md5c.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lib/libmd/md5c.c') diff --git a/lib/libmd/md5c.c b/lib/libmd/md5c.c index d097390..bfbb531 100644 --- a/lib/libmd/md5c.c +++ b/lib/libmd/md5c.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include "md5.h" static void MD5Transform(u_int32_t [4], const unsigned char [64]); @@ -335,3 +335,14 @@ MD5Transform (state, block) /* Zeroize sensitive information. */ memset ((void *)x, 0, sizeof (x)); } + +#undef MD5Init +__weak_reference(_libmd_MD5Init, MD5Init); +#undef MD5Update +__weak_reference(_libmd_MD5Update, MD5Update); +#undef MD5Pad +__weak_reference(_libmd_MD5Pad, MD5Pad); +#undef MD5Final +__weak_reference(_libmd_MD5Final, MD5Final); +#undef MD5Transform +__weak_reference(_libmd_MD5Transform, MD5Transform); -- cgit v1.1