Package: netdiag
Version: 1.2-1
Followup-For: Bug #957596
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu hirsute ubuntu-patch
Control: tags -1 patch

Hi,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/p/gcc-10.diff: Fix FTBFS with GCC 10.
  * d/p/pcap_init.diff: Rename pcap_init() to traf_pcap_init() to avoid
    conflict with libpcap.

Thanks for considering the patch.

Logan
diff -u netdiag-1.2/debian/patches/series netdiag-1.2/debian/patches/series
--- netdiag-1.2/debian/patches/series
+++ netdiag-1.2/debian/patches/series
@@ -6,3 +6,5 @@
 adapt_netload_to_bsd.diff
 adaption_to_kfreebsd.diff 
 clang-ftbfs.diff
+gcc-10.diff
+pcap_init.diff
only in patch2:
unchanged:
--- netdiag-1.2.orig/debian/patches/gcc-10.diff
+++ netdiag-1.2/debian/patches/gcc-10.diff
@@ -0,0 +1,39 @@
+--- a/netwatch-1.3.1-2/netwatch.c
++++ b/netwatch-1.3.1-2/netwatch.c
+@@ -151,6 +151,10 @@
+ #include "netresolv.h"
+ #include "netwatch.h"
+ 
++struct port_info *tcp_port_types[TCPHASH];
++
++struct port_info *udp_port_types[UDPHASH];
++
+ extern int errno;
+ 
+ #define MAXFILENAME 256
+--- a/netwatch-1.3.1-2/netwatch.h
++++ b/netwatch-1.3.1-2/netwatch.h
+@@ -209,10 +209,10 @@
+ };
+ 
+ #define TCPHASH 1786
+-struct port_info *tcp_port_types[TCPHASH];
++EXTERN_DEF struct port_info *tcp_port_types[TCPHASH];
+ 
+ #define UDPHASH 1786
+-struct port_info *udp_port_types[UDPHASH];
++EXTERN_DEF struct port_info *udp_port_types[UDPHASH];
+ 
+ int hashport( int port, int hash);
+ void initlist(struct port_info *first[], int hash);
+--- a/netwatch-1.3.1-2/dispdata.c
++++ b/netwatch-1.3.1-2/dispdata.c
+@@ -178,7 +178,7 @@
+ extern int simchange;
+ extern int simfwdir;
+ extern int simarr[8];
+-char *simfmt;
++extern char *simfmt;
+ extern int iseth;
+ extern int nw_logall;
+ extern char nw_allname[256];
only in patch2:
unchanged:
--- netdiag-1.2.orig/debian/patches/pcap_init.diff
+++ netdiag-1.2/debian/patches/pcap_init.diff
@@ -0,0 +1,29 @@
+--- a/trafshow-5.2.3/trafshow.c
++++ b/trafshow-5.2.3/trafshow.c
+@@ -58,7 +58,7 @@
+ static void vers();
+ static void usage();
+ static pcap_if_t *pcap_matchdev(pcap_if_t *dp, const char *name);
+-static int pcap_init(PCAP_HANDLER **ph_list, pcap_if_t *dp);
++static int traf_pcap_init(PCAP_HANDLER **ph_list, pcap_if_t *dp);
+ static void *pcap_feed(void *arg); /* PCAP_HANDLER *ph */
+ #ifdef        HAVE_PCAP_GET_SELECTABLE_FD
+ static void *pcap_feed2(void *arg); /* PCAP_HANDLER *ph */
+@@ -172,7 +172,7 @@
+       }
+ 
+       /* initialize list of pcap handlers */
+-      if ((op = pcap_init(&ph_list, dev_list)) < 1) {
++      if ((op = traf_pcap_init(&ph_list, dev_list)) < 1) {
+               fprintf(stderr, "No packet capture device available (no 
permission?)\n");
+               exit(1);
+       }
+@@ -301,7 +301,7 @@
+ }
+ 
+ static int
+-pcap_init(ph_list, dp)
++traf_pcap_init(ph_list, dp)
+       PCAP_HANDLER **ph_list;
+       pcap_if_t *dp;
+ {

Reply via email to