From 567e81188e5a2294ccb3ee7e36fbfcce19e071e4 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 2 Jan 2015 05:01:32 -0800 Subject: [PATCH] =?UTF-8?q?ETHER:=20Fix=20compile=20when=20threaded=20netw?= =?UTF-8?q?ork=20I/O=20is=20disabled=20on=20OS=20X=20(found=20by=20Martin?= =?UTF-8?q?=20Vorl=C3=A4nder)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sim_ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim_ether.c b/sim_ether.c index 059f7ac3..f5d9b8cb 100644 --- a/sim_ether.c +++ b/sim_ether.c @@ -1934,7 +1934,7 @@ else #if !defined (USE_READER_THREAD) #ifdef USE_SETNONBLOCK /* set ethernet device non-blocking so pcap_dispatch() doesn't hang */ - if (pcap_setnonblock (dev->handle, 1, errbuf) == -1) { + if (pcap_setnonblock (*handle, 1, errbuf) == -1) { sim_printf ("Eth: Failed to set non-blocking: %s\r\n", errbuf); } #endif @@ -1946,7 +1946,7 @@ else * the tcpdump mailinglist: http://seclists.org/tcpdump/2010/q1/110 */ int v = 1; - ioctl(pcap_fileno(dev->handle), BIOCIMMEDIATE, &v); + ioctl(pcap_fileno(*handle), BIOCIMMEDIATE, &v); } #endif /* defined (__APPLE__) */ #endif /* !defined (USE_READER_THREAD) */