Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I1rap-0000xR-Me for qemu-devel@nongnu.org; Fri, 22 Jun 2007 18:27:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I1rao-0000wh-Fg for qemu-devel@nongnu.org; Fri, 22 Jun 2007 18:27:03 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I1rao-0000wc-Aw for qemu-devel@nongnu.org; Fri, 22 Jun 2007 18:27:02 -0400 Received: from farad.aurel32.net ([82.232.2.251] helo=mail.aurel32.net) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I1ran-000498-UG for qemu-devel@nongnu.org; Fri, 22 Jun 2007 18:27:02 -0400 Received: from farad.aurel32.net ([2001:618:400:fc13:216:3eff:fe00:100c]) by mail.aurel32.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1I1ram-0007vM-G3 for qemu-devel@nongnu.org; Sat, 23 Jun 2007 00:27:00 +0200 Received: from aurel32 by farad.aurel32.net with local (Exim 4.63) (envelope-from ) id 1I1ram-00040m-8r for qemu-devel@nongnu.org; Sat, 23 Jun 2007 00:27:00 +0200 Date: Sat, 23 Jun 2007 00:27:00 +0200 From: Aurelien Jarno Message-ID: <20070622222700.GB15407@farad.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Subject: [Qemu-devel] [PATCH] GNU/kFreeBSD support Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, The patch below, taken from the Debian package, adds support for GNU/kFreeBSD. Bye, Aurelien Index: configure =================================================================== RCS file: /sources/qemu/qemu/configure,v retrieving revision 1.145 diff -u -d -p -r1.145 configure --- configure 26 May 2007 16:38:53 -0000 1.145 +++ configure 22 Jun 2007 22:16:44 -0000 @@ -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 =================================================================== RCS file: /sources/qemu/qemu/vl.c,v retrieving revision 1.310 diff -u -d -p -r1.310 vl.c --- vl.c 22 Jun 2007 08:23:44 -0000 1.310 +++ vl.c 22 Jun 2007 22:16:44 -0000 @@ -47,6 +47,8 @@ #ifndef __APPLE__ #include #endif +#elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) +#include #else #ifndef __sun__ #include @@ -3451,7 +3453,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; -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net