diff options
Diffstat (limited to 'emulators/qemu/patches/patch-aa')
-rw-r--r-- | emulators/qemu/patches/patch-aa | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/emulators/qemu/patches/patch-aa b/emulators/qemu/patches/patch-aa deleted file mode 100644 index 67411e6c964..00000000000 --- a/emulators/qemu/patches/patch-aa +++ /dev/null @@ -1,55 +0,0 @@ -$NetBSD: patch-aa,v 1.8 2010/10/27 13:24:09 tsutsui Exp $ - ---- net/tap-bsd.c.orig 2010-07-28 01:55:42.000000000 +0000 -+++ net/tap-bsd.c -@@ -28,6 +28,8 @@ - #include "qemu-error.h" - - #ifdef __NetBSD__ -+#include <sys/ioctl.h> -+#include <net/if.h> - #include <net/if_tap.h> - #endif - -@@ -44,8 +46,12 @@ - int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required) - { - int fd; -+#ifdef TAPGIFNAME -+ struct ifreq ifr; -+#else - char *dev; - struct stat s; -+#endif - - #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - /* if no ifname is given, always start the search from tap0. */ -@@ -77,14 +83,26 @@ int tap_open(char *ifname, int ifname_si - #else - TFR(fd = open("/dev/tap", O_RDWR)); - if (fd < 0) { -- fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation\n"); -+ fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation: %s\n", strerror(errno)); - return -1; - } - #endif - -- fstat(fd, &s); -+#ifdef TAPGIFNAME -+ if (ioctl (fd, TAPGIFNAME, (void*)&ifr) < 0) { -+ fprintf(stderr, "warning: could not open get tap name: %s\n", -+ strerror(errno)); -+ return -1; -+ } -+ pstrcpy(ifname, ifname_size, ifr.ifr_name); -+#else -+ if (fstat(fd, &s) < 0) { -+ fprintf(stderr, "warning: could not stat /dev/tap: no virtual network emulation: %s\n", strerror(errno)); -+ return -1; -+ } - dev = devname(s.st_rdev, S_IFCHR); - pstrcpy(ifname, ifname_size, dev); -+#endif - - if (*vnet_hdr) { - /* BSD doesn't have IFF_VNET_HDR */ |