aboutsummaryrefslogtreecommitdiffstats
path: root/community/yersinia/0001-fix-compile-with-GCC-10.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/yersinia/0001-fix-compile-with-GCC-10.patch')
-rw-r--r--community/yersinia/0001-fix-compile-with-GCC-10.patch112
1 files changed, 112 insertions, 0 deletions
diff --git a/community/yersinia/0001-fix-compile-with-GCC-10.patch b/community/yersinia/0001-fix-compile-with-GCC-10.patch
new file mode 100644
index 00000000000..ff538c9be98
--- /dev/null
+++ b/community/yersinia/0001-fix-compile-with-GCC-10.patch
@@ -0,0 +1,112 @@
+From 36247225dc7a6f38c4ba70537e20351f04762749 Mon Sep 17 00:00:00 2001
+From: Ariadne Conill <ariadne@dereferenced.org>
+Date: Thu, 17 Dec 2020 06:03:14 -0700
+Subject: [PATCH] fix compile with GCC 10
+
+---
+ src/interfaces.c | 1 +
+ src/interfaces.h | 2 +-
+ src/ncurses-callbacks.h | 4 ++--
+ src/ncurses-interface.c | 2 ++
+ src/ncurses-interface.h | 4 ++--
+ src/protocols.c | 2 ++
+ src/protocols.h | 2 +-
+ 7 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/src/interfaces.c b/src/interfaces.c
+index 556fcfe..4c49ce1 100644
+--- a/src/interfaces.c
++++ b/src/interfaces.c
+@@ -103,6 +103,7 @@
+ #include "interfaces.h"
+
+
++list_t *interfaces;
+
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+diff --git a/src/interfaces.h b/src/interfaces.h
+index 02512de..86b6111 100644
+--- a/src/interfaces.h
++++ b/src/interfaces.h
+@@ -67,7 +67,7 @@
+
+ #define NO_TIMEOUT 0
+
+-list_t *interfaces;
++extern list_t *interfaces;
+
+ struct interface_data {
+ int8_t up; /* is it active? */
+diff --git a/src/ncurses-callbacks.h b/src/ncurses-callbacks.h
+index 997443c..c25abcc 100644
+--- a/src/ncurses-callbacks.h
++++ b/src/ncurses-callbacks.h
+@@ -77,8 +77,8 @@
+ #define CAN_RESIZE 1
+ #endif
+
+-u_int8_t pointer[MAX_PROTOCOLS];
+-WINDOW *info_window;
++extern u_int8_t pointer[MAX_PROTOCOLS];
++extern WINDOW *info_window;
+
+ void ncurses_c_refresh_mwindow(u_int8_t, WINDOW *, u_int8_t, struct term_node *);
+ void ncurses_c_refresh_bwindow(u_int8_t, WINDOW *, struct term_node *);
+diff --git a/src/ncurses-interface.c b/src/ncurses-interface.c
+index 0e7f3a0..9e7a815 100644
+--- a/src/ncurses-interface.c
++++ b/src/ncurses-interface.c
+@@ -92,6 +92,8 @@
+ #include "ncurses-interface.h"
+ #include "ncurses-callbacks.h"
+
++u_int8_t pointer[MAX_PROTOCOLS];
++WINDOW *info_window;
+
+ /*
+ * Ncurses init
+diff --git a/src/ncurses-interface.h b/src/ncurses-interface.h
+index 67046ce..ac7e202 100644
+--- a/src/ncurses-interface.h
++++ b/src/ncurses-interface.h
+@@ -80,8 +80,8 @@
+ #define CAN_RESIZE 1
+ #endif
+
+-u_int8_t pointer[MAX_PROTOCOLS];
+-WINDOW *info_window;
++extern u_int8_t pointer[MAX_PROTOCOLS];
++extern WINDOW *info_window;
+
+ int8_t ncurses_i_init(WINDOW *[], PANEL *[], struct term_node *);
+ void ncurses_i_add_node(void);
+diff --git a/src/protocols.c b/src/protocols.c
+index 55ecb3d..5200889 100644
+--- a/src/protocols.c
++++ b/src/protocols.c
+@@ -61,6 +61,8 @@
+
+ #include "protocols.h"
+
++struct protocol_def protocols[MAX_PROTOCOLS];
++
+ void
+ protocol_init(void)
+ {
+diff --git a/src/protocols.h b/src/protocols.h
+index ea95793..c2c5551 100644
+--- a/src/protocols.h
++++ b/src/protocols.h
+@@ -207,7 +207,7 @@ struct protocol_def {
+ end_t end;
+ };
+
+-struct protocol_def protocols[MAX_PROTOCOLS];
++extern struct protocol_def protocols[MAX_PROTOCOLS];
+
+ void protocol_init(void);
+ int8_t protocol_register(u_int8_t, const char *, const char *, const char *,
+--
+2.29.2
+