diff --git a/configure b/configure index 793d9d1..b9504a5 100755 --- 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 88f4177..4def8ab 100644 --- 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;