Forráskód Böngészése

lcdproc: Fix compilation with GCC >= 10.x

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj 3 éve
szülő
commit
e8b286f893

+ 46 - 0
meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc/0001-Fix-compilation-with-GCC-10.x.patch

@@ -0,0 +1,46 @@
+From 9b07f6a472c24f5e1b65746756764391be0d55e4 Mon Sep 17 00:00:00 2001
+From: Harald Geyer <harald@ccbib.org>
+Date: Mon, 10 Feb 2020 13:15:10 +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.
+
+Closes: #148
+
+Upstream-Status: Backport
+Suggested-by: Conrad Kostecki <conrad@kostecki.com>
+Signed-off-by: Harald Geyer <harald@ccbib.org>
+---
+ clients/lcdproc/iface.c | 1 +
+ clients/lcdproc/iface.h | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/clients/lcdproc/iface.c b/clients/lcdproc/iface.c
+index 40e50cb7..1ac355bd 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];
+ 
+ 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..c1bd6b5b 100644
+--- a/clients/lcdproc/iface.h
++++ b/clients/lcdproc/iface.h
+@@ -18,7 +18,7 @@
+ /** max number of interfaces in multi-interface mode */
+ #define MAX_INTERFACES 3
+ 
+-IfaceInfo iface[MAX_INTERFACES];	/* interface info */
++extern IfaceInfo iface[MAX_INTERFACES];	/* interface info */
+ 
+ /** Update screen content */
+ int iface_screen(int rep, int display, int *flags_ptr);
+-- 
+2.28.0
+

+ 1 - 0
meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc_git.bb

@@ -15,6 +15,7 @@ SRC_URI = "git://github.com/lcdproc/lcdproc \
            file://0001-Fix-parallel-build-fix-port-internal-make-dependenci.patch \
            file://0002-Include-limits.h-for-PATH_MAX-definition.patch \
            file://0003-Fix-non-x86-platforms-on-musl.patch \
+           file://0001-Fix-compilation-with-GCC-10.x.patch \
            "
 
 S = "${WORKDIR}/git"