summaryrefslogtreecommitdiff
path: root/net/tap-linux.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2009-10-30 22:27:00 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-30 16:38:15 -0500
commit71f4effce79ec0485586963ea764f2c212c72f26 (patch)
tree58890ab7f368bb8b673e08f97f0ceebd32ce404f /net/tap-linux.h
parent195325a4c10cc4b9d678e76b99b4f74b7223adf2 (diff)
downloadqemu-71f4effce79ec0485586963ea764f2c212c72f26.tar.gz
Unbreak tap compilation on OS X
Currently compiling the tap sources breaks on Mac OS X. This is because of: 1) tap-linux.h requiring Linux includes 2) typos 3) missing #includes This patch adds what's necessary to compile tap happily on Mac OS X. I haven't tested if using tap actually works, but I don't think that's a major issue as that code was probably seriously untested before already. I didn't split the patch, because it's only a few lines of code and splitting is probably not worth the effort here. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net/tap-linux.h')
-rw-r--r--net/tap-linux.h4
1 files changed, 4 insertions, 0 deletions
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