diff --git a/sim_ether.c b/sim_ether.c index 1277e72a..046765a5 100644 --- a/sim_ether.c +++ b/sim_ether.c @@ -1703,8 +1703,6 @@ _eth_callback((u_char *)opaque, &header, buf); #endif #if defined (USE_READER_THREAD) -#include - static void * _eth_reader(void *arg) { @@ -3617,7 +3615,6 @@ t_stat eth_filter_hash(ETH_DEV* dev, int addr_count, ETH_MAC* const addresses, { int i; char buf[116+66*ETH_FILTER_MAX]; -char errbuf[PCAP_ERRBUF_SIZE]; char mac[20]; char* buf2; t_stat status; @@ -3762,6 +3759,7 @@ sim_debug(dev->dbit, dev->dptr, "BPF string is: |%s|\n", buf); #ifdef USE_BPF if (dev->eth_api == ETH_API_PCAP) { + char errbuf[PCAP_ERRBUF_SIZE]; bpf_u_int32 bpf_subnet, bpf_netmask; if (pcap_lookupnet(dev->name, &bpf_subnet, &bpf_netmask, errbuf)<0) @@ -3824,11 +3822,12 @@ int eth_host_devices(int used, int max, ETH_LIST* list) { pcap_t* conn = NULL; int i, j, datalink = 0; -char errbuf[PCAP_ERRBUF_SIZE]; for (i=0; i #if defined (USE_SETNONBLOCK) #undef USE_SETNONBLOCK #endif /* USE_SETNONBLOCK */ @@ -112,6 +113,8 @@ extern "C" { #if (!defined (xBSD) && !defined(_WIN32) && !defined(VMS) && !defined(__CYGWIN__)) || defined (HAVE_TAP_NETWORK) || defined (HAVE_VDE_NETWORK) #define MUST_DO_SELECT 1 #endif +#else +#include #endif /* USE_READER_THREAD */ /* give priority to USE_NETWORK over USE_SHARED */