diff options
author | Brad Smith <brad@comstyle.com> | 2021-03-26 19:49:12 -0400 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2021-05-27 11:03:55 +0800 |
commit | 4f8a39494aded9f2026a26b137378ea2ee3d5338 (patch) | |
tree | d3442641e63273414005bde8a3d7f93b9caa72f0 /net | |
parent | 1e157667d7657418b68fadb5cc016c6804e17501 (diff) | |
download | qemu-4f8a39494aded9f2026a26b137378ea2ee3d5338.zip qemu-4f8a39494aded9f2026a26b137378ea2ee3d5338.tar.gz qemu-4f8a39494aded9f2026a26b137378ea2ee3d5338.tar.bz2 |
tap-bsd: Remove special casing for older OpenBSD releases
OpenBSD added support for tap(4) 10 releases ago.
Remove the special casing for older releases.
Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/tap-bsd.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/net/tap-bsd.c b/net/tap-bsd.c index 77aaf67..59dfcdf 100644 --- a/net/tap-bsd.c +++ b/net/tap-bsd.c @@ -35,10 +35,6 @@ #include <net/if_tap.h> #endif -#if defined(__OpenBSD__) -#include <sys/param.h> -#endif - #ifndef __FreeBSD__ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required, int mq_required, Error **errp) @@ -59,11 +55,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, if (*ifname) { snprintf(dname, sizeof dname, "/dev/%s", ifname); } else { -#if defined(__OpenBSD__) && OpenBSD < 201605 - snprintf(dname, sizeof dname, "/dev/tun%d", i); -#else snprintf(dname, sizeof dname, "/dev/tap%d", i); -#endif } TFR(fd = open(dname, O_RDWR)); if (fd >= 0) { |