diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2020-02-02 22:31:05 +0100 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2020-02-02 22:31:05 +0100 |
commit | 55cee0ab612902bb1125bf68b7f2b21103539bf3 (patch) | |
tree | 8052c3e2674d47faaea289a3801463141960f717 /app-misc/lcdproc | |
parent | sci-mathematics/psmt2-frontend: RedundantLongDescription (diff) | |
download | gentoo-55cee0ab612902bb1125bf68b7f2b21103539bf3.tar.gz gentoo-55cee0ab612902bb1125bf68b7f2b21103539bf3.tar.bz2 gentoo-55cee0ab612902bb1125bf68b7f2b21103539bf3.zip |
app-misc/lcdproc: fix -fno-common compilation
Closes: https://bugs.gentoo.org/707788
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'app-misc/lcdproc')
-rw-r--r-- | app-misc/lcdproc/files/lcdproc-0.5.9-fix-fno-common-build.patch | 53 | ||||
-rw-r--r-- | app-misc/lcdproc/lcdproc-0.5.9.ebuild | 3 |
2 files changed, 55 insertions, 1 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; diff --git a/app-misc/lcdproc/lcdproc-0.5.9.ebuild b/app-misc/lcdproc/lcdproc-0.5.9.ebuild index 592f9d1f576d..2fc2ad8d6a88 100644 --- a/app-misc/lcdproc/lcdproc-0.5.9.ebuild +++ b/app-misc/lcdproc/lcdproc-0.5.9.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -88,6 +88,7 @@ DOCS=( "CREDITS.md" "TODO" ) PATCHES=( "${FILESDIR}/${P}-fix-parallel-make.patch" "${FILESDIR}/${P}-use-freetype2-pkg-config.patch" + "${FILESDIR}/${P}-fix-fno-common-build.patch" ) src_unpack() { |