aboutsummaryrefslogtreecommitdiff
path: root/lib/libmd/sha256c.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libmd/sha256c.c')
-rw-r--r--lib/libmd/sha256c.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libmd/sha256c.c b/lib/libmd/sha256c.c
index 76cec8ec3815..4227b0cfbfbb 100644
--- a/lib/libmd/sha256c.c
+++ b/lib/libmd/sha256c.c
@@ -295,3 +295,18 @@ SHA256_Final(unsigned char digest[32], SHA256_CTX * ctx)
/* Clear the context state */
memset((void *)ctx, 0, sizeof(*ctx));
}
+
+#ifdef WEAK_REFS
+/* When building libmd, provide weak references. Note: this is not
+ activated in the context of compiling these sources for internal
+ use in libcrypt.
+ */
+#undef SHA256_Init
+__weak_reference(_libmd_SHA256_Init, SHA256_Init);
+#undef SHA256_Update
+__weak_reference(_libmd_SHA256_Update, SHA256_Update);
+#undef SHA256_Final
+__weak_reference(_libmd_SHA256_Final, SHA256_Final);
+#undef SHA256_Transform
+__weak_reference(_libmd_SHA256_Transform, SHA256_Transform);
+#endif