summaryrefslogtreecommitdiff
path: root/recipes/qemu/qemu-0.9.0+cvs20070613/65_kfreebsd.patch
blob: ea060811a171491e17f986e223bd86160c043999 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
 configure |    6 ++++++
 vl.c      |    4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

Index: configure
===================================================================
--- configure.orig	2007-06-13 11:48:22.000000000 +0100
+++ configure	2007-06-13 11:52:07.000000000 +0100
@@ -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"
Index: vl.c
===================================================================
--- vl.c.orig	2007-06-13 11:51:54.000000000 +0100
+++ vl.c	2007-06-13 11:51:56.000000000 +0100
@@ -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>
@@ -3454,7 +3456,7 @@ static TAPState *net_tap_fd_init(VLANSta
     return s;
 }
 
-#ifdef _BSD
+#if defined (_BSD) || defined (__FreeBSD_kernel__)
 static int tap_open(char *ifname, int ifname_size)
 {
     int fd;