diff -Nuar iftop-77901c8c/iftop-dump.c iftop-pcap-1-10/iftop-dump.c --- iftop-77901c8c/iftop-dump.c 2018-10-03 17:02:36.000000000 +0000 +++ iftop-pcap-1-10/iftop-dump.c 2021-01-17 23:40:39.896124155 +0000 @@ -64,7 +64,7 @@ pthread_mutex_t tick_mutex; pcap_t* pd; /* pcap descriptor */ -struct bpf_program pcap_filter; +struct bpf_program my_pcap_filter; pcap_handler packet_handler; FILE*fout = NULL; @@ -375,12 +375,12 @@ sprintf(x, "(%s) and ip", filter); } else x = xstrdup("ip"); - if (pcap_compile(pd, &pcap_filter, x, 1, 0) == -1) { + if (pcap_compile(pd, &my_pcap_filter, x, 1, 0) == -1) { xfree(x); return pcap_geterr(pd); } xfree(x); - if (pcap_setfilter(pd, &pcap_filter) == -1) + if (pcap_setfilter(pd, &my_pcap_filter) == -1) return pcap_geterr(pd); else return NULL; diff -Nuar iftop-77901c8c/iftop.c iftop-pcap-1-10/iftop.c --- iftop-77901c8c/iftop.c 2018-10-03 17:02:36.000000000 +0000 +++ iftop-pcap-1-10/iftop.c 2021-01-17 23:40:54.116240467 +0000 @@ -74,7 +74,7 @@ pthread_mutex_t tick_mutex; pcap_t* pd; /* pcap descriptor */ -struct bpf_program pcap_filter; +struct bpf_program my_pcap_filter; pcap_handler packet_handler; sig_atomic_t foad; @@ -679,12 +679,12 @@ sprintf(x, "(%s) and (ip or ip6)", filter); } else x = xstrdup("ip or ip6"); - if (pcap_compile(pd, &pcap_filter, x, 1, 0) == -1) { + if (pcap_compile(pd, &my_pcap_filter, x, 1, 0) == -1) { xfree(x); return pcap_geterr(pd); } xfree(x); - if (pcap_setfilter(pd, &pcap_filter) == -1) + if (pcap_setfilter(pd, &my_pcap_filter) == -1) return pcap_geterr(pd); else return NULL;