You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.8 KiB

From e2e868db3e153b3f959e119a51703d4afb99c624 Mon Sep 17 00:00:00 2001
From: magnum <john.magnum@hushmail.com>
Date: Wed, 13 May 2015 12:05:00 +0200
Subject: [PATCH] Add another solution to #1093. This make it possible to build
using gcc 5 without --std=gnu89 (although I kept the latter for now). See
also #1250.
---
src/DES_bs_b.c | 3 +++
src/MD5_std.c | 12 ++++++++++++
2 files changed, 15 insertions(+)
diff --git a/src/DES_bs_b.c b/src/DES_bs_b.c
index 306b4e4..18c9235 100644
--- a/src/DES_bs_b.c
+++ b/src/DES_bs_b.c
@@ -1272,6 +1272,9 @@ static MAYBE_INLINE void DES_bs_finalize_keys(void)
#endif
#if DES_bs_mt
+#if __GNUC__ >= 5
+extern
+#endif
MAYBE_INLINE void DES_bs_set_salt_for_thread(int t, unsigned int salt)
#else
void DES_bs_set_salt(ARCH_WORD salt)
diff --git a/src/MD5_std.c b/src/MD5_std.c
index 6bdcd35..1eec9b4 100644
--- a/src/MD5_std.c
+++ b/src/MD5_std.c
@@ -496,9 +496,15 @@ extern void MD5_body(MD5_word x[15], MD5_word out[4]);
#if MD5_std_mt
#define MD5_body(x, out) \
MD5_body_for_thread(t, x, out)
+#if __GNUC__ >= 5
+extern
+#endif
MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
MD5_word x[15], MD5_word out[4])
#else
+#if __GNUC__ >= 5
+extern
+#endif
MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
#endif
{
@@ -595,10 +601,16 @@ MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
#if MD5_std_mt
#define MD5_body(x0, x1, out0, out1) \
MD5_body_for_thread(t, x0, x1, out0, out1)
+#if __GNUC__ >= 5
+extern
+#endif
MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
MD5_word x0[15], MD5_word x1[15],
MD5_word out0[4], MD5_word out1[4])
#else
+#if __GNUC__ >= 5
+extern
+#endif
MAYBE_INLINE_BODY void MD5_body(MD5_word x0[15], MD5_word x1[15],
MD5_word out0[4], MD5_word out1[4])
#endif