aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libpcap/patches/201-space_optimization.patch
blob: 80e3824d825e02e92d736aaee2e8c23e4d011db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- a/pcap-common.c
+++ b/pcap-common.c
@@ -1570,14 +1570,23 @@ swap_pseudo_headers(int linktype, struct
 		break;
 
 	case DLT_USB_LINUX:
+#ifndef PCAP_SUPPORT_USB
+		return;
+#endif
 		swap_linux_usb_header(hdr, data, 0);
 		break;
 
 	case DLT_USB_LINUX_MMAPPED:
+#ifndef PCAP_SUPPORT_USB
+		return;
+#endif
 		swap_linux_usb_header(hdr, data, 1);
 		break;
 
 	case DLT_NFLOG:
+#ifndef PCAP_SUPPORT_NETFILTER
+		return;
+#endif
 		swap_nflog_header(hdr, data);
 		break;
 	}