commit:     55cee0ab612902bb1125bf68b7f2b21103539bf3
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  2 21:31:05 2020 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Feb  2 21:31:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55cee0ab

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 <AT> gentoo.org>

 .../files/lcdproc-0.5.9-fix-fno-common-build.patch | 53 ++++++++++++++++++++++
 app-misc/lcdproc/lcdproc-0.5.9.ebuild              |  3 +-
 2 files changed, 55 insertions(+), 1 deletion(-)

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 00000000000..2dc472f5d22
--- /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 <[email protected]>
+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 <[email protected]>
+---
+ 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 592f9d1f576..2fc2ad8d6a8 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() {

Reply via email to