Kfreebsd config, by Aurelien Jarno.
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 23 Jun 2007 16:03:36 +0000 (16:03 +0000)
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 23 Jun 2007 16:03:36 +0000 (16:03 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3010 c046a42c-6fe2-441c-8c8c-71466251a162

configure
vl.c

index 793d9d156d92b9c00a349c71cbdf5068b4152445..b9504a52880a49b00724156cbe42b051ca9f3e9c 100755 (executable)
--- a/configure
+++ b/configure
@@ -112,6 +112,12 @@ OS_CFLAGS="-mno-cygwin"
 MINGW32*)
 mingw32="yes"
 ;;
+GNU/kFreeBSD)
+oss="yes"
+if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
+    kqemu="yes"
+fi
+;;
 FreeBSD)
 bsd="yes"
 oss="yes"
diff --git a/vl.c b/vl.c
index 88f4177529585ed6c016ce353458af6e7337af5b..4def8abfee3b60857092a45e834c6c932086254a 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -47,6 +47,8 @@
 #ifndef __APPLE__
 #include <libutil.h>
 #endif
+#elif defined (__GLIBC__) && defined (__FreeBSD_kernel__)
+#include <freebsd/stdlib.h>
 #else
 #ifndef __sun__
 #include <linux/if.h>
@@ -3451,7 +3453,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan, int fd)
     return s;
 }
 
-#ifdef _BSD
+#if defined (_BSD) || defined (__FreeBSD_kernel__)
 static int tap_open(char *ifname, int ifname_size)
 {
     int fd;