From 26d6d07f96eddbbf4e2affa305ce371925aa98d8 Mon Sep 17 00:00:00 2001 From: hpng Date: Sat, 30 Dec 2023 16:46:57 +0800 Subject: [PATCH] fix compile in cygwin --- src/capture.c | 2 ++ src/capture.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/capture.c b/src/capture.c index 6d19d3d1..446df7bd 100644 --- a/src/capture.c +++ b/src/capture.c @@ -518,10 +518,12 @@ capture_packet_reasm_ip(capture_info_t *capinfo, const struct pcap_pkthdr *heade // Skip VLAN header if present if (capinfo->link == DLT_EN10MB) { +#ifndef __CYGWIN__ struct ether_header *eth = (struct ether_header *) packet; if (ntohs(eth->ether_type) == ETHERTYPE_8021Q) { link_hl += 4; } +#endif } #ifdef SLL_HDR_LEN diff --git a/src/capture.h b/src/capture.h index 755ca5d6..cf6dcad5 100644 --- a/src/capture.h +++ b/src/capture.h @@ -65,7 +65,9 @@ #endif #include +#ifndef __CYGWIN__ #include +#endif #include #include #include