diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-07 16:55:48 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-07 16:55:48 +0000 |
commit | 24646c7ed8a94a2b39e03121f0079bb89e708ec7 (patch) | |
tree | 04f897462bb637769093e130890da5ea88c30eef | |
parent | 57a92c8e36ee9c0774d58c086b76b67ae981e6d4 (diff) |
Fix some build issues for BSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5646 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | net.c | 19 | ||||
-rw-r--r-- | qemu-char.c | 18 | ||||
-rw-r--r-- | vl.c | 19 |
3 files changed, 36 insertions, 20 deletions
@@ -54,26 +54,31 @@ #include <termios.h> #include <sys/mman.h> #include <sys/ioctl.h> +#include <sys/resource.h> #include <sys/socket.h> #include <netinet/in.h> +#include <net/if.h> +#ifdef __NetBSD__ +#include <net/if_tap.h> +#endif +#ifdef __linux__ +#include <linux/if_tun.h> +#endif +#include <arpa/inet.h> #include <dirent.h> #include <netdb.h> #include <sys/select.h> -#include <arpa/inet.h> #ifdef _BSD #include <sys/stat.h> -#if !defined(__APPLE__) && !defined(__OpenBSD__) +#ifdef __FreeBSD__ #include <libutil.h> -#endif -#ifdef __OpenBSD__ -#include <net/if.h> +#else +#include <util.h> #endif #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) #include <freebsd/stdlib.h> #else #ifdef __linux__ -#include <linux/if.h> -#include <linux/if_tun.h> #include <pty.h> #include <malloc.h> #include <linux/rtc.h> diff --git a/qemu-char.c b/qemu-char.c index ceffbed655..fa60819d66 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -45,25 +45,31 @@ #include <termios.h> #include <sys/mman.h> #include <sys/ioctl.h> +#include <sys/resource.h> #include <sys/socket.h> #include <netinet/in.h> +#include <net/if.h> +#ifdef __NetBSD__ +#include <net/if_tap.h> +#endif +#ifdef __linux__ +#include <linux/if_tun.h> +#endif +#include <arpa/inet.h> #include <dirent.h> #include <netdb.h> #include <sys/select.h> -#include <arpa/inet.h> #ifdef _BSD #include <sys/stat.h> -#if !defined(__APPLE__) && !defined(__OpenBSD__) +#ifdef __FreeBSD__ #include <libutil.h> -#endif -#ifdef __OpenBSD__ -#include <net/if.h> +#else +#include <util.h> #endif #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) #include <freebsd/stdlib.h> #else #ifdef __linux__ -#include <linux/if.h> #include <pty.h> #include <linux/ppdev.h> @@ -55,26 +55,31 @@ #include <termios.h> #include <sys/mman.h> #include <sys/ioctl.h> +#include <sys/resource.h> #include <sys/socket.h> #include <netinet/in.h> +#include <net/if.h> +#if defined(__NetBSD__) +#include <net/if_tap.h> +#endif +#ifdef __linux__ +#include <linux/if_tun.h> +#endif +#include <arpa/inet.h> #include <dirent.h> #include <netdb.h> #include <sys/select.h> -#include <arpa/inet.h> #ifdef _BSD #include <sys/stat.h> -#if !defined(__APPLE__) && !defined(__OpenBSD__) +#ifdef __FreeBSD__ #include <libutil.h> -#endif -#ifdef __OpenBSD__ -#include <net/if.h> +#else +#include <util.h> #endif #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) #include <freebsd/stdlib.h> #else #ifdef __linux__ -#include <linux/if.h> -#include <linux/if_tun.h> #include <pty.h> #include <malloc.h> #include <linux/rtc.h> |