Merge pull request #580 from wigyori/cc-libpcap
[15.05/openwrt.git] / package / libs / libpcap / patches / 201-space_optimization.patch
1 --- a/pcap-common.c
2 +++ b/pcap-common.c
3 @@ -1447,14 +1447,23 @@ swap_pseudo_headers(int linktype, struct
4                 break;
5  
6         case DLT_USB_LINUX:
7 +#ifndef PCAP_SUPPORT_USB
8 +               return;
9 +#endif
10                 swap_linux_usb_header(hdr, data, 0);
11                 break;
12  
13         case DLT_USB_LINUX_MMAPPED:
14 +#ifndef PCAP_SUPPORT_USB
15 +               return;
16 +#endif
17                 swap_linux_usb_header(hdr, data, 1);
18                 break;
19  
20         case DLT_NFLOG:
21 +#ifndef PCAP_SUPPORT_NETFILTER
22 +               return;
23 +#endif
24                 swap_nflog_header(hdr, data);
25                 break;
26         }