summaryrefslogtreecommitdiff
path: root/pcr/john/gcc5.patch
blob: f2a7984955abb57260fc3e11ebc0bc83fefaff72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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