summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/lcdproc/files/lcdproc-0.5.9-fix-fno-common-build.patch')
-rw-r--r--app-misc/lcdproc/files/lcdproc-0.5.9-fix-fno-common-build.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/app-misc/lcdproc/files/lcdproc-0.5.9-fix-fno-common-build.patch b/app-misc/lcdproc/files/lcdproc-0.5.9-fix-fno-common-build.patch
new file mode 100644
index 000000000000..2dc472f5d22a
--- /dev/null
+++ b/app-misc/lcdproc/files/lcdproc-0.5.9-fix-fno-common-build.patch
@@ -0,0 +1,53 @@
+From fda5302878692da933dc03cd011f8ddffefa07a4 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conrad@kostecki.com>
+Date: Sun, 2 Feb 2020 18:48:07 +0100
+Subject: [PATCH] Fix compilation with GCC >= 10.x
+
+Starting with GCC >= 10.x, -fno-common is used as default
+instead of -fcommon. This patch fixes the compilation.
+
+Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
+---
+ clients/lcdproc/iface.c | 1 +
+ clients/lcdproc/iface.h | 2 --
+ clients/lcdproc/main.c | 2 ++
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/clients/lcdproc/iface.c b/clients/lcdproc/iface.c
+index 40e50cb7..45be5b97 100644
+--- a/clients/lcdproc/iface.c
++++ b/clients/lcdproc/iface.c
+@@ -32,6 +32,7 @@
+ #define UNSET_INT -1
+ #define UNSET_STR "\01"
+
++IfaceInfo iface[MAX_INTERFACES]; /* interface info */
+
+ static int iface_count = 0; /* number of interfaces */
+ static char unit_label[10] = "B"; /* default unit label is Bytes */
+diff --git a/clients/lcdproc/iface.h b/clients/lcdproc/iface.h
+index cc6dbaaf..ee188f38 100644
+--- a/clients/lcdproc/iface.h
++++ b/clients/lcdproc/iface.h
+@@ -18,8 +18,6 @@
+ /** max number of interfaces in multi-interface mode */
+ #define MAX_INTERFACES 3
+
+-IfaceInfo iface[MAX_INTERFACES]; /* interface info */
+-
+ /** Update screen content */
+ int iface_screen(int rep, int display, int *flags_ptr);
+ /** read interface stats from /proc/net/dev */
+diff --git a/clients/lcdproc/main.c b/clients/lcdproc/main.c
+index 01b02baf..7c7a4215 100644
+--- a/clients/lcdproc/main.c
++++ b/clients/lcdproc/main.c
+@@ -53,6 +53,8 @@
+ # include "eyebox.h"
+ #endif
+
++extern IfaceInfo iface[MAX_INTERFACES]; /* interface info */
++
+ /* The following 8 variables are defined 'external' in main.h! */
+ int Quit = 0;
+ int sock = -1;