aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/gnupg-1-build-with-gcc10.patch
blob: 40b2aff98e2c7f260eebaeb13df2ff3b512556e3 (about) (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
64
Borrowed from Debian
https://sources.debian.org/src/gnupg1/1.4.23-1.1/debian/patches/0006-fix-for-gcc10.patch/

Subject: Fix build with gcc-10
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Date: 2021-01-04
Bug: https://dev.gnupg.org/T5215
Bug-Debian: https://bugs.debian.org/957293

--- a/g10/options.h
+++ b/g10/options.h
@@ -29,6 +29,8 @@
 /* Norcraft can't cope with common symbols */
 #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
 #define EXTERN_UNLESS_MAIN_MODULE extern
+#elif defined (__GNUC__) && __GNUC__ >= 10
+#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
 #else
 #define EXTERN_UNLESS_MAIN_MODULE
 #endif
--- a/include/cipher.h
+++ b/include/cipher.h
@@ -117,6 +117,8 @@
 #ifndef EXTERN_UNLESS_MAIN_MODULE
 #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
 #define EXTERN_UNLESS_MAIN_MODULE extern
+#elif defined (__GNUC__) && __GNUC__ >= 10
+#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
 #else
 #define EXTERN_UNLESS_MAIN_MODULE
 #endif
--- a/include/iobuf.h
+++ b/include/iobuf.h
@@ -72,6 +72,8 @@
 #ifndef EXTERN_UNLESS_MAIN_MODULE
 #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
 #define EXTERN_UNLESS_MAIN_MODULE extern
+#elif defined (__GNUC__) && __GNUC__ >= 10
+#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
 #else
 #define EXTERN_UNLESS_MAIN_MODULE 
 #endif
--- a/include/memory.h
+++ b/include/memory.h
@@ -93,6 +93,8 @@
 #ifndef EXTERN_UNLESS_MAIN_MODULE
 #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
 #define EXTERN_UNLESS_MAIN_MODULE extern
+#elif defined (__GNUC__) && __GNUC__ >= 10
+#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
 #else
 #define EXTERN_UNLESS_MAIN_MODULE 
 #endif
--- a/include/mpi.h
+++ b/include/mpi.h
@@ -38,6 +38,8 @@
 #ifndef EXTERN_UNLESS_MAIN_MODULE
 #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
 #define EXTERN_UNLESS_MAIN_MODULE extern
+#elif defined (__GNUC__) && __GNUC__ >= 10
+#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
 #else
 #define EXTERN_UNLESS_MAIN_MODULE 
 #endif