$OpenBSD: patch-sim_ether_c,v 1.3 2005/06/19 03:47:25 david Exp $
--- sim_ether.c.orig	Wed Mar 31 14:38:58 2004
+++ sim_ether.c	Wed Oct 20 19:46:41 2004
@@ -557,6 +557,12 @@ int pcap_sendpacket(pcap_t* handle, cons
 }
 #endif /* !HAS_PCAP_SENDPACKET */
 
+int pcap_setnonblock(pcap_t* handle, int nonblock, char *errbuf)
+{
+  fcntl(pcap_fileno(handle), F_SETFL, fcntl(pcap_fileno(handle), F_GETFL, 0) | O_NONBLOCK);
+  return 0;
+}
+
 #if defined (USE_READER_THREAD)
 #include <pthread.h>
 
@@ -1080,12 +1086,13 @@ int eth_host_devices(int used, int max, 
 
 int eth_devices(int max, ETH_LIST* list)
 {
+  int i = 0;
+
+#ifndef DONT_USE_PCAP_FINDALLDEVS
   pcap_if_t* alldevs;
   pcap_if_t* dev;
-  int i = 0;
   char errbuf[PCAP_ERRBUF_SIZE];
 
-#ifndef DONT_USE_PCAP_FINDALLDEVS
   /* retrieve the device list */
   if (pcap_findalldevs(&alldevs, errbuf) == -1) {
     char* msg = "Eth: error in pcap_findalldevs: %s\r\n";
