summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <sultan@gentoo.org>2021-01-01 15:36:03 +0100
committerStephan Hartmann <sultan@gentoo.org>2021-01-01 15:36:03 +0100
commit50b8e0b57f883baef80dc44f9d5c2ed03031b3ff (patch)
treec235b55150c26e3f04363589d5901c5ea52e163a /net-analyzer/gspoof
parentprofiles: last-rite app-benchmarks/contest (diff)
downloadgentoo-50b8e0b57f883baef80dc44f9d5c2ed03031b3ff.tar.gz
gentoo-50b8e0b57f883baef80dc44f9d5c2ed03031b3ff.tar.bz2
gentoo-50b8e0b57f883baef80dc44f9d5c2ed03031b3ff.zip
net-analyzer/gspoof: fix building with -fno-common
Closes: https://bugs.gentoo.org/706876 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'net-analyzer/gspoof')
-rw-r--r--net-analyzer/gspoof/files/gspoof-3.2-fno-common.patch221
-rw-r--r--net-analyzer/gspoof/gspoof-3.2-r3.ebuild11
2 files changed, 226 insertions, 6 deletions
diff --git a/net-analyzer/gspoof/files/gspoof-3.2-fno-common.patch b/net-analyzer/gspoof/files/gspoof-3.2-fno-common.patch
new file mode 100644
index 000000000000..c91a54231150
--- /dev/null
+++ b/net-analyzer/gspoof/files/gspoof-3.2-fno-common.patch
@@ -0,0 +1,221 @@
+--- a/ginclude.h
++++ b/ginclude.h
+@@ -22,8 +22,8 @@ struct FLAGS
+ urg:1,
+ ece:1,
+ cwr:1;
+-}
+-f;
++};
++extern struct FLAGS f;
+
+ struct CHECKS
+ {
+@@ -31,33 +31,33 @@ struct CHECKS
+ data:1, /* include payload */
+ linkl:1, /* work with datalink */
+ debug:1; /* enable debug mode */
+-}
+-ck;
++};
++extern struct CHECKS ck;
+
+ struct MULTI
+ {
+ u_long number;
+ u_long delay;
+-}
+-m;
++};
++extern struct MULTI m;
+
+ struct ECN
+ {
+ u_int dscp:8;
+ u_int ecn_ct:2;
+ u_int ecn_ce:1;
+-}
+-ipv4_tos;
++};
++extern struct ECN ipv4_tos;
+
+-u_long shost;
+-u_long dhost;
+-u_long seq;
+-u_long ack;
+-u_short id;
+-u_short urgp;
+-u_short tos;
++extern u_long shost;
++extern u_long dhost;
++extern u_long seq;
++extern u_long ack;
++extern u_short id;
++extern u_short urgp;
++extern u_short tos;
+
+-char device[10];
+-char data[128];
++extern char device[10];
++extern char data[128];
+
+-u_char ebuf[LIBNET_ERRBUF_SIZE];
++extern u_char ebuf[LIBNET_ERRBUF_SIZE];
+--- a/interface.h
++++ b/interface.h
+@@ -20,47 +20,47 @@ GtkWidget* create_ECNWin (void);
+ /* Define common Widget */
+
+ /* MainWin */
+-GtkWidget *iface_entry;
+-GtkWidget *srcmac_entry;
+-GtkWidget *dstmac_entry;
+-GtkWidget *ethtype_combo;
+-GtkWidget *ethtype_combo_entry;
+-GtkWidget *DatalinkFrame;
++extern GtkWidget *iface_entry;
++extern GtkWidget *srcmac_entry;
++extern GtkWidget *dstmac_entry;
++extern GtkWidget *ethtype_combo;
++extern GtkWidget *ethtype_combo_entry;
++extern GtkWidget *DatalinkFrame;
+
+-GtkWidget *srcaddr_entry;
+-GtkWidget *dstaddr_entry;
+-GtkWidget *ttl_entry;
+-GtkWidget *id_entry;
+-GtkWidget *tos_entry;
++extern GtkWidget *srcaddr_entry;
++extern GtkWidget *dstaddr_entry;
++extern GtkWidget *ttl_entry;
++extern GtkWidget *id_entry;
++extern GtkWidget *tos_entry;
+
+-GtkWidget *srcport_entry;
+-GtkWidget *dstport_entry;
+-GtkWidget *flags_table;
+-GtkWidget *syn_checkbutton;
+-GtkWidget *fin_checkbutton;
+-GtkWidget *push_checkbutton;
+-GtkWidget *ack_checkbutton;
+-GtkWidget *rst_checkbutton;
+-GtkWidget *urg_checkbutton;
+-GtkWidget *ece_checkbutton;
+-GtkWidget *cwr_checkbutton;
+-GtkWidget *seq_entry;
+-GtkWidget *ack_entry;
+-GtkWidget *win_entry;
+-GtkWidget *urg_entry;
++extern GtkWidget *srcport_entry;
++extern GtkWidget *dstport_entry;
++extern GtkWidget *flags_table;
++extern GtkWidget *syn_checkbutton;
++extern GtkWidget *fin_checkbutton;
++extern GtkWidget *push_checkbutton;
++extern GtkWidget *ack_checkbutton;
++extern GtkWidget *rst_checkbutton;
++extern GtkWidget *urg_checkbutton;
++extern GtkWidget *ece_checkbutton;
++extern GtkWidget *cwr_checkbutton;
++extern GtkWidget *seq_entry;
++extern GtkWidget *ack_entry;
++extern GtkWidget *win_entry;
++extern GtkWidget *urg_entry;
+
+ /* Info TextView */
+-GtkWidget *TextView;
+-GtkTextBuffer *TextBuffer;
+-GtkWidget *VerticalScroll;
++extern GtkWidget *TextView;
++extern GtkTextBuffer *TextBuffer;
++extern GtkWidget *VerticalScroll;
+
+ /* DataWin */
+-GtkWidget *DataEntry;
++extern GtkWidget *DataEntry;
+
+ /* Multi */
+-GtkWidget *table2;
+-GtkWidget *NumberEntryMulti;
+-GtkWidget *DelayEntryMulty;
++extern GtkWidget *table2;
++extern GtkWidget *NumberEntryMulti;
++extern GtkWidget *DelayEntryMulty;
+
+ /* ECN */
+-GtkWidget *dscpEntry;
++extern GtkWidget *dscpEntry;
+--- a/gfuncts.c
++++ b/gfuncts.c
+@@ -19,9 +19,12 @@
+
+ #include "interface.h"
+
++struct FLAGS f;
++struct CHECKS ck;
++struct MULTI m;
++
+ /* private functions */
+ int CheckValues();
+-u_short datalen; /* data (tcp payload) lenght */
+
+ int Initialize()
+ {
+@@ -139,6 +142,7 @@ int SendPacket()
+ /* BEGIN of variables ' declaration */
+ libnet_t *l;
+ char *dataptr;
++ u_short datalen; /* data (tcp payload) lenght */
+
+ u_short sport, dport;
+ u_short flag=0x00;
+--- a/interface.c
++++ b/interface.c
+@@ -27,6 +27,47 @@
+ #include "ginclude.h" /* define payload and multi options */
+ #include "common.h"
+
++GtkWidget *iface_entry;
++GtkWidget *srcmac_entry;
++GtkWidget *dstmac_entry;
++GtkWidget *ethtype_combo;
++GtkWidget *ethtype_combo_entry;
++GtkWidget *DatalinkFrame;
++
++GtkWidget *srcaddr_entry;
++GtkWidget *dstaddr_entry;
++GtkWidget *ttl_entry;
++GtkWidget *id_entry;
++GtkWidget *tos_entry;
++
++GtkWidget *srcport_entry;
++GtkWidget *dstport_entry;
++GtkWidget *flags_table;
++GtkWidget *syn_checkbutton;
++GtkWidget *fin_checkbutton;
++GtkWidget *push_checkbutton;
++GtkWidget *ack_checkbutton;
++GtkWidget *rst_checkbutton;
++GtkWidget *urg_checkbutton;
++GtkWidget *ece_checkbutton;
++GtkWidget *cwr_checkbutton;
++GtkWidget *seq_entry;
++GtkWidget *ack_entry;
++GtkWidget *win_entry;
++GtkWidget *urg_entry;
++
++GtkWidget *TextView;
++GtkTextBuffer *TextBuffer;
++GtkWidget *VerticalScroll;
++
++GtkWidget *DataEntry;
++
++GtkWidget *table2;
++GtkWidget *NumberEntryMulti;
++GtkWidget *DelayEntryMulty;
++
++GtkWidget *dscpEntry;
++
+ #define GLADE_HOOKUP_OBJECT(component,widget,name) \
+ g_object_set_data_full (G_OBJECT (component), name, \
+ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
diff --git a/net-analyzer/gspoof/gspoof-3.2-r3.ebuild b/net-analyzer/gspoof/gspoof-3.2-r3.ebuild
index 81f4bbad8ce7..0dc610e0e3d7 100644
--- a/net-analyzer/gspoof/gspoof-3.2-r3.ebuild
+++ b/net-analyzer/gspoof/gspoof-3.2-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -12,8 +12,6 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
-IUSE=""
-
DEPEND="
x11-libs/gtk+:2
dev-libs/glib:2
@@ -22,9 +20,10 @@ DEPEND="
RDEPEND="${DEPEND}"
PATCHES=(
- "${FILESDIR}"/${PN}-def-values.patch
- "${FILESDIR}"/${P}-icon.patch
- "${FILESDIR}"/${PN}-3.2-libdir.patch
+ "${FILESDIR}/${PN}-def-values.patch"
+ "${FILESDIR}/${PN}-3.2-icon.patch"
+ "${FILESDIR}/${PN}-3.2-libdir.patch"
+ "${FILESDIR}/${PN}-3.2-fno-common.patch"
)
src_prepare() {