Lakka-LibreELEC/packages/addons/addon-depends/network-tools-depends/iftop/patches/iftop-Fix-building-with-gcc10.patch
2020-06-24 20:56:41 +02:00

54 lines
1.3 KiB
Diff

From d9402e29486f60ea4a9b8da530c60e6c8404127b Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@siol.net>
Date: Mon, 22 Jun 2020 20:18:59 +0200
Subject: [PATCH] Fix building with gcc10
---
ui_common.c | 6 ++++++
ui_common.h | 12 +++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ui_common.c b/ui_common.c
index dcf66466fda4..b1027ec16da7 100644
--- a/ui_common.c
+++ b/ui_common.c
@@ -17,6 +17,12 @@
#include "ui_common.h"
+sorted_list_type screen_list;
+host_pair_line totals;
+int peaksent, peakrecv, peaktotal;
+hash_type* screen_hash;
+hash_type* service_hash;
+
/* 2, 10 and 40 seconds */
int history_divs[HISTORY_DIVISIONS] = {1, 5, 20};
diff --git a/ui_common.h b/ui_common.h
index 63ae5bb69886..1403d11c310c 100644
--- a/ui_common.h
+++ b/ui_common.h
@@ -33,12 +33,14 @@ typedef struct host_pair_line_tag {
extern options_t options;
-sorted_list_type screen_list;
-host_pair_line totals;
-int peaksent, peakrecv, peaktotal;
+extern sorted_list_type screen_list;
+extern host_pair_line totals;
+extern int peaksent;
+extern int peakrecv;
+extern int peaktotal;
extern history_type history_totals;
-hash_type* screen_hash;
-hash_type* service_hash;
+extern hash_type* screen_hash;
+extern hash_type* service_hash;
void analyse_data(void);
void screen_list_init(void);
--
2.27.0