1From 18a9f7732944bfe45023f9dd7528295e7d43e678 Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Wed, 12 Aug 2020 22:31:33 +0200 4Subject: [PATCH] ui_common.h: fix build with gcc 10 5 6Define global variables as extern in header to fix the build with gcc 10 7which default to -fno-common: https://gcc.gnu.org/gcc-10/porting_to.html 8 9Fixes: 10 - http://autobuild.buildroot.org/results/55a8581f11e776439782c228441ef1c8c1243386 11 12Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 13[Upstream status: sent to iftop-users@lists.beasts.org] 14--- 15 ui_common.c | 6 ++++++ 16 ui_common.h | 10 +++++----- 17 2 files changed, 11 insertions(+), 5 deletions(-) 18 19diff --git a/ui_common.c b/ui_common.c 20index dcf6646..b1027ec 100644 21--- a/ui_common.c 22+++ b/ui_common.c 23@@ -17,6 +17,12 @@ 24 25 #include "ui_common.h" 26 27+sorted_list_type screen_list; 28+host_pair_line totals; 29+int peaksent, peakrecv, peaktotal; 30+hash_type* screen_hash; 31+hash_type* service_hash; 32+ 33 /* 2, 10 and 40 seconds */ 34 int history_divs[HISTORY_DIVISIONS] = {1, 5, 20}; 35 36diff --git a/ui_common.h b/ui_common.h 37index 63ae5bb..add72fe 100644 38--- a/ui_common.h 39+++ b/ui_common.h 40@@ -33,12 +33,12 @@ typedef struct host_pair_line_tag { 41 42 extern options_t options; 43 44-sorted_list_type screen_list; 45-host_pair_line totals; 46-int peaksent, peakrecv, peaktotal; 47+extern sorted_list_type screen_list; 48+extern host_pair_line totals; 49+extern int peaksent, peakrecv, peaktotal; 50 extern history_type history_totals; 51-hash_type* screen_hash; 52-hash_type* service_hash; 53+extern hash_type* screen_hash; 54+extern hash_type* service_hash; 55 56 void analyse_data(void); 57 void screen_list_init(void); 58-- 592.27.0 60 61