From 00e2c4e6849adc1b9cc8b9daf9069d67ff086dc3 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Tue, 19 Dec 2017 21:12:55 +0100 Subject: ptunnel-ng: * fixed missing conditionaled compile for pcap * ported to mingw64 --- src/ptunnel.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ptunnel.h') diff --git a/src/ptunnel.h b/src/ptunnel.h index c5a9e9b..f2b514d 100644 --- a/src/ptunnel.h +++ b/src/ptunnel.h @@ -74,6 +74,14 @@ #include "pdesc.h" #include "challenge.h" +#ifdef WIN32 +/* pthread porting to windows */ +typedef CRITICAL_SECTION pthread_mutex_t; +typedef unsigned long pthread_t; +#define pthread_mutex_init InitializeCriticalSectionAndSpinCount +#define pthread_mutex_lock EnterCriticalSection +#define pthread_mutex_unlock LeaveCriticalSection +#endif extern pthread_mutex_t chain_lock; extern uint32_t num_tunnels; extern const int icmp_receive_buf_len; @@ -129,8 +137,10 @@ typedef struct { /* function Prototypes */ void* pt_proxy(void *args); +#ifdef HAVE_PCAP void pcap_packet_handler(u_char *refcon, const struct pcap_pkthdr *hdr, const u_char* pkt); +#endif void pt_forwarder(void); -- cgit v1.2.3