net-analyzer/ipv6toolkit: Fix CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Mon, 27 Jan 2020 01:48:21 +0000 (02:48 +0100)
committerJeroen Roovers <jer@gentoo.org>
Mon, 27 Jan 2020 01:49:11 +0000 (02:49 +0100)
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Closes: https://bugs.gentoo.org/show_bug.cgi?id=706312
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
net-analyzer/ipv6toolkit/files/ipv6toolkit-2.1_p20190919-fno-common.patch [new file with mode: 0644]
net-analyzer/ipv6toolkit/ipv6toolkit-2.1_p20190919.ebuild
net-analyzer/ipv6toolkit/ipv6toolkit-99999999.ebuild

diff --git a/net-analyzer/ipv6toolkit/files/ipv6toolkit-2.1_p20190919-fno-common.patch b/net-analyzer/ipv6toolkit/files/ipv6toolkit-2.1_p20190919-fno-common.patch
new file mode 100644 (file)
index 0000000..9d4a3dc
--- /dev/null
@@ -0,0 +1,192 @@
+--- a/tools/flow6.c
++++ b/tools/flow6.c
+@@ -85,8 +85,7 @@
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ unsigned char         buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN];
+ unsigned char         *v6buffer, *ptr, *startofprefixes;
+ char                          *pref;
+--- a/tools/frag6.c
++++ b/tools/frag6.c
+@@ -94,8 +94,7 @@
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ unsigned char         buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN];
+ unsigned char         *v6buffer, *ptr, *startofprefixes;
+ char                          *pref;
+--- a/tools/icmp6.c
++++ b/tools/icmp6.c
+@@ -114,8 +114,7 @@
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ unsigned char         buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN];
+ unsigned char         *v6buffer, *ptr, *startofprefixes;
+ char                          *pref;
+--- a/tools/ipv6toolkit.h
++++ b/tools/ipv6toolkit.h
+@@ -2,3 +2,10 @@
+ #define       MAX_CMDLINE_OPT_LEN     40
+ #define DATE_STR_LEN          40
++#include <pcap.h>
++#include <setjmp.h>
++
++extern char errbuf[PCAP_ERRBUF_SIZE];
++extern struct bpf_program pcap_filter;
++extern sigjmp_buf env;
++extern unsigned int canjump;
+--- a/tools/jumbo6.c
++++ b/tools/jumbo6.c
+@@ -80,8 +80,7 @@
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ unsigned char         buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN];
+ unsigned char         *v6buffer, *ptr, *startofprefixes;
+ char                          *pref;
+--- a/tools/na6.c
++++ b/tools/na6.c
+@@ -61,8 +61,7 @@
+ struct in6_addr               *pkt_ipv6addr;    
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ char                          all_nodes_addr[]= ALL_NODES_MULTICAST_ADDR;
+ unsigned char         buffer[65556];
+ unsigned char         *v6buffer, *ptr, *startofprefixes;
+--- a/tools/ni6.c
++++ b/tools/ni6.c
+@@ -90,8 +90,7 @@
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ unsigned char         buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN];
+ char                          domain[MAX_DOMAIN_LEN];
+ unsigned char         *v6buffer, *ptr, *startofprefixes;
+--- a/tools/ns6.c
++++ b/tools/ns6.c
+@@ -59,8 +59,7 @@
+ const u_char          *pktdata;
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ unsigned char         buffer[65556];
+ unsigned char                 *v6buffer, *ptr, *startofprefixes;
+--- a/tools/path6.c
++++ b/tools/path6.c
+@@ -88,8 +88,7 @@
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ unsigned char         buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN];
+ unsigned char         *v6buffer, *ptr, *startofprefixes;
+ char                          *pref;
+--- a/tools/ra6.c
++++ b/tools/ra6.c
+@@ -64,8 +64,7 @@
+ struct in6_addr               *pkt_ipv6addr;    
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ char                          all_nodes_addr[]= ALL_NODES_MULTICAST_ADDR;
+ unsigned char         buffer[ETHER_HDR_LEN+MIN_IPV6_HLEN+MAX_IPV6_PAYLOAD];
+--- a/tools/rd6.c
++++ b/tools/rd6.c
+@@ -106,8 +106,7 @@
+ bpf_u_int32                           my_netmask;
+ bpf_u_int32                           my_ip;
+-struct bpf_program            pcap_filter;
+-char                                  dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                                  dev[64];
+ unsigned char                 buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN];
+ unsigned char                 *v6buffer, *ptr, *startofprefixes;
+ char                                  *pref;
+--- a/tools/rs6.c
++++ b/tools/rs6.c
+@@ -60,8 +60,7 @@
+ struct in6_addr                       *pkt_ipv6addr;    
+ bpf_u_int32                           my_netmask;
+ bpf_u_int32                           my_ip;
+-struct bpf_program            pcap_filter;
+-char                                  dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                                  dev[64];
+ char                                  all_nodes_addr[]= ALL_NODES_MULTICAST_ADDR;
+ unsigned char                 buffer[65556];
+--- a/tools/scan6.c
++++ b/tools/scan6.c
+@@ -153,8 +153,7 @@
+ bpf_u_int32                           my_netmask;
+ bpf_u_int32                           my_ip;
+-struct bpf_program            pcap_filter;
+-char                                  dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                                  dev[64];
+ unsigned char                 buffer[BUFFER_SIZE], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN];
+ char                                  line[LINE_BUFFER_SIZE];
+ unsigned char                 *v6buffer, *ptr, *startofprefixes;
+@@ -269,10 +268,6 @@
+                                                                443, 547, 993, 995, 1194, 3306, 5060, 5061, 5432, 6446, 8080};
+-/* IPv6 Address Resolution */
+-sigjmp_buf                            env;
+-unsigned int                  canjump;
+-
+ int main(int argc, char **argv){
+       extern char                             *optarg;
+       int                                             r;
+--- a/tools/tcp6.c
++++ b/tools/tcp6.c
+@@ -116,8 +116,7 @@
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ unsigned char         buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN];
+ unsigned char         *v6buffer, *ptr, *startofprefixes;
+ char                          *pref;
+--- a/tools/udp6.c
++++ b/tools/udp6.c
+@@ -99,8 +99,7 @@
+ bpf_u_int32                   my_netmask;
+ bpf_u_int32                   my_ip;
+-struct bpf_program    pcap_filter;
+-char                          dev[64], errbuf[PCAP_ERRBUF_SIZE];
++char                          dev[64];
+ unsigned char         buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_UDP_HLEN];
+ unsigned char         *v6buffer, *ptr, *startofprefixes;
+ char                          *pref;
index 6a4df21782cae0ada317a1c72a18c11afc7febdb..bff5e134fff8b02d24e8f9440bb21658e2ed04bd 100644 (file)
@@ -21,6 +21,9 @@ RDEPEND="
        ${DEPEND}
        sys-apps/hwids
 "
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.1_p20190919-fno-common.patch
+)
 
 HWIDS_OUI_PATH=/usr/share/misc/oui.txt
 
index 8a862e677183bf7855d7cb0232d73d2b9c2ab1c5..2248b0b2e75850268046e58ee345bbb4d018d48b 100644 (file)
@@ -19,6 +19,9 @@ RDEPEND="
        ${DEPEND}
        sys-apps/hwids
 "
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.1_p20190919-fno-common.patch
+)
 
 HWIDS_OUI_PATH=/usr/share/misc/oui.txt