From 6a4b3fc7bb2801b6470f44c6a1c9d8b38edb53b5 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 20 Apr 2022 01:16:16 +0200 Subject: [PATCH] Enabled the non-blocking stuff for Windows as well. --- src/network/net_pcap.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index b1541cdc6..c76b62581 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -123,9 +123,7 @@ static const unsigned char *(*f_pcap_next)(void *,void *); static int (*f_pcap_sendpacket)(void *,const unsigned char *,int); static void (*f_pcap_close)(void *); -#ifndef _WIN32 static int (*f_pcap_setnonblock)(void*, int, char*); -#endif static dllimp_t pcap_imports[] = { { "pcap_lib_version", &f_pcap_lib_version }, { "pcap_findalldevs", &f_pcap_findalldevs }, @@ -136,9 +134,7 @@ static dllimp_t pcap_imports[] = { { "pcap_next", &f_pcap_next }, { "pcap_sendpacket", &f_pcap_sendpacket }, { "pcap_close", &f_pcap_close }, -#ifndef _WIN32 { "pcap_setnonblock", &f_pcap_setnonblock }, -#endif { NULL, NULL }, }; @@ -389,10 +385,8 @@ net_pcap_reset(const netcard_t *card, uint8_t *mac) pcap_log(" Unable to open device: %s!\n", network_host); return(-1); } -#ifndef _WIN32 if (f_pcap_setnonblock((void*)pcap, 1, errbuf) != 0) pcap_log("PCAP: failed nonblock %s\n", errbuf); -#endif pcap_log("PCAP: interface: %s\n", network_host);