diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/tap-bsd.c | 6 | ||||
-rw-r--r-- | net/tap-linux.h | 4 | ||||
-rw-r--r-- | net/tap.c | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/net/tap-bsd.c b/net/tap-bsd.c index 3ad14bb2c8..ac84383f0f 100644 --- a/net/tap-bsd.c +++ b/net/tap-bsd.c @@ -23,7 +23,8 @@ */ #include "net/tap.h" -#incude "qemu-common.h" +#include "qemu-common.h" +#include "sysemu.h" #ifdef __NetBSD__ #include <net/if_tap.h> @@ -34,8 +35,9 @@ #else #include <util.h> #endif -#elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) +#if defined (__GLIBC__) && defined (__FreeBSD_kernel__) #include <freebsd/stdlib.h> +#endif #if defined(__OpenBSD__) #include <util.h> diff --git a/net/tap-linux.h b/net/tap-linux.h index d81c65081f..f1a0fce176 100644 --- a/net/tap-linux.h +++ b/net/tap-linux.h @@ -17,6 +17,8 @@ #define QEMU_TAP_H #include <stdint.h> +#ifdef __LINUX__ + #include <linux/ioctl.h> /* Ioctl defines */ @@ -26,6 +28,8 @@ #define TUNGETIFF _IOR('T', 210, unsigned int) #define TUNSETSNDBUF _IOW('T', 212, int) +#endif + /* TUNSETIFF ifr flags */ #define IFF_TAP 0x0002 #define IFF_NO_PI 0x1000 @@ -31,6 +31,7 @@ #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/wait.h> +#include <sys/socket.h> #include <net/if.h> #include "net.h" |