Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame^] | 1 | From 924bd2da3a00e030e29d82b74ef82900bd50b475 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com> |
| 3 | Date: Mon, 3 Feb 2020 13:18:33 +0100 |
| 4 | Subject: [PATCH 2/3] Drop superfluous global variable definitions |
| 5 | |
| 6 | The only place where the EXTERN macro mechanism is used to define the |
| 7 | global variables 'vt_outmap' and 'vt_inmap' is minicom.c (by defining |
| 8 | an empty EXTERN macro and including the minicom.h header). The file |
| 9 | vt100.c already defines these variables. The vt100.o object file is |
| 10 | always linked to minicom.o. Thus it is safe not to define the |
| 11 | variables in minicom.c and only declare them in the minicom.h header. |
| 12 | |
| 13 | This fixes linking with gcc 10 which uses -fno-common by default, |
| 14 | disallowing multiple global variable definitions. |
| 15 | |
| 16 | Upstream-Status: Pending |
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 18 | --- |
| 19 | src/minicom.h | 2 +- |
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 21 | |
| 22 | diff --git a/src/minicom.h b/src/minicom.h |
| 23 | index 061c013..0f9693b 100644 |
| 24 | --- a/src/minicom.h |
| 25 | +++ b/src/minicom.h |
| 26 | @@ -141,7 +141,7 @@ EXTERN int sbcolor; /* Status Bar Background Color */ |
| 27 | EXTERN int st_attr; /* Status Bar attributes. */ |
| 28 | |
| 29 | /* jl 04.09.97 conversion tables */ |
| 30 | -EXTERN unsigned char vt_outmap[256], vt_inmap[256]; |
| 31 | +extern unsigned char vt_outmap[256], vt_inmap[256]; |
| 32 | |
| 33 | /* MARK updated 02/17/95 - history buffer */ |
| 34 | EXTERN int num_hist_lines; /* History buffer size */ |
| 35 | -- |
| 36 | 2.24.1 |
| 37 | |