summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch
blob: 1740051e0a5f6c59b9deaa7a44b138bf7eb58fe7 (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
From 924bd2da3a00e030e29d82b74ef82900bd50b475 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
Date: Mon, 3 Feb 2020 13:18:33 +0100
Subject: [PATCH 2/3] Drop superfluous global variable definitions

The only place where the EXTERN macro mechanism is used to define the
global variables 'vt_outmap' and 'vt_inmap' is minicom.c (by defining
an empty EXTERN macro and including the minicom.h header). The file
vt100.c already defines these variables. The vt100.o object file is
always linked to minicom.o. Thus it is safe not to define the
variables in minicom.c and only declare them in the minicom.h header.

This fixes linking with gcc 10 which uses -fno-common by default,
disallowing multiple global variable definitions.

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/minicom.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/minicom.h b/src/minicom.h
index 061c013..0f9693b 100644
--- a/src/minicom.h
+++ b/src/minicom.h
@@ -141,7 +141,7 @@ EXTERN int sbcolor;     /* Status Bar Background Color */
 EXTERN int st_attr;	/* Status Bar attributes. */
 
 /* jl 04.09.97 conversion tables */
-EXTERN unsigned char vt_outmap[256], vt_inmap[256];
+extern unsigned char vt_outmap[256], vt_inmap[256];
 
 /* MARK updated 02/17/95 - history buffer */
 EXTERN int num_hist_lines;  /* History buffer size */
-- 
2.24.1