Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 1 | From 9b07f6a472c24f5e1b65746756764391be0d55e4 Mon Sep 17 00:00:00 2001 |
| 2 | From: Harald Geyer <harald@ccbib.org> |
| 3 | Date: Mon, 10 Feb 2020 13:15:10 +0100 |
| 4 | Subject: [PATCH] Fix compilation with GCC >= 10.x |
| 5 | |
| 6 | Starting with GCC >= 10.x, -fno-common is used as default |
| 7 | instead of -fcommon. This patch fixes the compilation. |
| 8 | |
| 9 | Closes: #148 |
| 10 | |
| 11 | Upstream-Status: Backport |
| 12 | Suggested-by: Conrad Kostecki <conrad@kostecki.com> |
| 13 | Signed-off-by: Harald Geyer <harald@ccbib.org> |
| 14 | --- |
| 15 | clients/lcdproc/iface.c | 1 + |
| 16 | clients/lcdproc/iface.h | 2 +- |
| 17 | 2 files changed, 2 insertions(+), 1 deletion(-) |
| 18 | |
| 19 | diff --git a/clients/lcdproc/iface.c b/clients/lcdproc/iface.c |
| 20 | index 40e50cb7..1ac355bd 100644 |
| 21 | --- a/clients/lcdproc/iface.c |
| 22 | +++ b/clients/lcdproc/iface.c |
| 23 | @@ -32,6 +32,7 @@ |
| 24 | #define UNSET_INT -1 |
| 25 | #define UNSET_STR "\01" |
| 26 | |
| 27 | +IfaceInfo iface[MAX_INTERFACES]; |
| 28 | |
| 29 | static int iface_count = 0; /* number of interfaces */ |
| 30 | static char unit_label[10] = "B"; /* default unit label is Bytes */ |
| 31 | diff --git a/clients/lcdproc/iface.h b/clients/lcdproc/iface.h |
| 32 | index cc6dbaaf..c1bd6b5b 100644 |
| 33 | --- a/clients/lcdproc/iface.h |
| 34 | +++ b/clients/lcdproc/iface.h |
| 35 | @@ -18,7 +18,7 @@ |
| 36 | /** max number of interfaces in multi-interface mode */ |
| 37 | #define MAX_INTERFACES 3 |
| 38 | |
| 39 | -IfaceInfo iface[MAX_INTERFACES]; /* interface info */ |
| 40 | +extern IfaceInfo iface[MAX_INTERFACES]; /* interface info */ |
| 41 | |
| 42 | /** Update screen content */ |
| 43 | int iface_screen(int rep, int display, int *flags_ptr); |
| 44 | -- |
| 45 | 2.28.0 |
| 46 | |