changeset 2333:69d292ccf196

Fix multiple declarations issue with COLOR_ATTRIB This fails compilation with GCC 10 or -fno-common in CFLAGS. Link: https://bugs.gentoo.org/707418
author Andrey Utkin <andrey_utkin@gentoo.org>
date Mon, 17 Feb 2020 23:40:49 +0000
parents 645d3ef1c88e
children 6ad3cada768c
files mcabber/mcabber/screen.c mcabber/mcabber/screen.h
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/mcabber/screen.c	Mon Nov 25 21:40:51 2019 +0100
+++ b/mcabber/mcabber/screen.c	Mon Feb 17 23:40:49 2020 +0000
@@ -59,6 +59,8 @@
 #include "xmpp.h"
 #include "main.h"
 
+int COLOR_ATTRIB[COLOR_max];
+
 #define get_color(col)      (COLOR_PAIR(col)|COLOR_ATTRIB[col])
 #define compose_color(col)  (COLOR_PAIR(col->color_pair)|col->color_attrib)
 
--- a/mcabber/mcabber/screen.h	Mon Nov 25 21:40:51 2019 +0100
+++ b/mcabber/mcabber/screen.h	Mon Feb 17 23:40:49 2020 +0000
@@ -57,7 +57,7 @@
   COLOR_max
 };
 
-int COLOR_ATTRIB[COLOR_max];
+extern int COLOR_ATTRIB[COLOR_max];
 
 extern gboolean chatstates_disabled;
 extern gboolean Autoaway;