summaryrefslogtreecommitdiff
path: root/net-im/spectrum2/files/spectrum2-2.0.12-gcc-10-compatibility.patch
blob: ad13208b3e132d625c8a3a83f8ab7ea0968adc51 (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
From 95e6968c0f8c95f6bd817e5081e0b10dea9d4269 Mon Sep 17 00:00:00 2001
From: Conrad Kostecki <kostecki@his.de>
Date: Wed, 13 May 2020 14:22:27 +0200
Subject: [PATCH] Fix dfrotz compilation with GCC >= 10

Since GCC enables by default -fno-common,
the compilation of dfrotz due multiple definitions will fail.

Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
---
 backends/frotz/dfrotz/dumb/dumb_init.c   | 2 +-
 backends/frotz/dfrotz/dumb/dumb_input.c  | 2 +-
 backends/frotz/dfrotz/dumb/dumb_output.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/backends/frotz/dfrotz/dumb/dumb_init.c b/backends/frotz/dfrotz/dumb/dumb_init.c
index 4b9c6704..35295b74 100644
--- a/backends/frotz/dfrotz/dumb/dumb_init.c
+++ b/backends/frotz/dfrotz/dumb/dumb_init.c
@@ -7,7 +7,7 @@
 
 #include "dumb_frotz.h"
 
-f_setup_t f_setup;
+extern f_setup_t f_setup;
 
 #define INFORMATION "\
 An interpreter for all Infocom and other Z-Machine games.\n\
diff --git a/backends/frotz/dfrotz/dumb/dumb_input.c b/backends/frotz/dfrotz/dumb/dumb_input.c
index 4149b2b0..88fc8ae5 100644
--- a/backends/frotz/dfrotz/dumb/dumb_input.c
+++ b/backends/frotz/dfrotz/dumb/dumb_input.c
@@ -5,7 +5,7 @@
  */
 
 #include "dumb_frotz.h"
-f_setup_t f_setup;
+extern f_setup_t f_setup;
 
 static char runtime_usage[] =
   "DUMB-FROTZ runtime help:\n"
diff --git a/backends/frotz/dfrotz/dumb/dumb_output.c b/backends/frotz/dfrotz/dumb/dumb_output.c
index 9e505167..6dc7db82 100644
--- a/backends/frotz/dfrotz/dumb/dumb_output.c
+++ b/backends/frotz/dfrotz/dumb/dumb_output.c
@@ -7,7 +7,7 @@
 
 #include "dumb_frotz.h"
 
-f_setup_t f_setup;
+extern f_setup_t f_setup;
 
 static bool show_line_numbers = FALSE;
 static bool show_line_types = -1;