summaryrefslogtreecommitdiff
path: root/packages/qemu/files/65_kfreebsd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/qemu/files/65_kfreebsd.patch')
-rw-r--r--packages/qemu/files/65_kfreebsd.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/qemu/files/65_kfreebsd.patch b/packages/qemu/files/65_kfreebsd.patch
new file mode 100644
index 0000000000..ea060811a1
--- /dev/null
+++ b/packages/qemu/files/65_kfreebsd.patch
@@ -0,0 +1,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;