From: guy Date: Sun, 18 Nov 2007 04:37:27 +0000 (+0000) Subject: From Kris Katterjohn: when building a SITA version of libpcap, don't X-Git-Tag: libpcap-1.1.0~404 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/5bf51391d461a128702511336bdfb8cdbe8e2ac3 From Kris Katterjohn: when building a SITA version of libpcap, don't include dead code. --- diff --git a/CREDITS b/CREDITS index b357383d..7ec2ae20 100644 --- a/CREDITS +++ b/CREDITS @@ -57,6 +57,7 @@ Additional people who have contributed patches: Kazushi Sugyo Klaus Klein Koryn Grant + Kris Katterjohn Krzysztof Halasa Lorenzo Cavallaro Loris Degioanni diff --git a/pcap-linux.c b/pcap-linux.c index a2b198a3..c78d21fc 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -27,7 +27,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.130 2007-10-20 01:15:14 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.131 2007-11-18 04:37:27 guy Exp $ (LBL)"; #endif /* @@ -989,8 +989,7 @@ pcap_setfilter_linux(pcap_t *handle, struct bpf_program *filter) #ifdef SITA return acn_setfilter(handle->fd, filter); -#endif - +#else /* Make our private copy of the filter */ if (install_bpf_program(handle, filter) < 0) @@ -1106,6 +1105,7 @@ pcap_setfilter_linux(pcap_t *handle, struct bpf_program *filter) #endif /* SO_ATTACH_FILTER */ return 0; +#endif /* SITA */ } /* @@ -1754,9 +1754,7 @@ static void pcap_close_linux( pcap_t *handle ) { #ifdef SITA pcap_close_acn(handle); - return; -#endif - +#else struct pcap *p, *prevp; struct ifreq ifr; @@ -1825,6 +1823,7 @@ static void pcap_close_linux( pcap_t *handle ) free(handle->md.device); handle->md.device = NULL; pcap_close_common(handle); +#endif /* SITA */ } /*