Commit 24646c7ed8a94a2b39e03121f0079bb89e708ec7
1 parent
57a92c8e
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
Showing
3 changed files
with
36 additions
and
20 deletions
net.c
... | ... | @@ -54,26 +54,31 @@ |
54 | 54 | #include <termios.h> |
55 | 55 | #include <sys/mman.h> |
56 | 56 | #include <sys/ioctl.h> |
57 | +#include <sys/resource.h> | |
57 | 58 | #include <sys/socket.h> |
58 | 59 | #include <netinet/in.h> |
60 | +#include <net/if.h> | |
61 | +#ifdef __NetBSD__ | |
62 | +#include <net/if_tap.h> | |
63 | +#endif | |
64 | +#ifdef __linux__ | |
65 | +#include <linux/if_tun.h> | |
66 | +#endif | |
67 | +#include <arpa/inet.h> | |
59 | 68 | #include <dirent.h> |
60 | 69 | #include <netdb.h> |
61 | 70 | #include <sys/select.h> |
62 | -#include <arpa/inet.h> | |
63 | 71 | #ifdef _BSD |
64 | 72 | #include <sys/stat.h> |
65 | -#if !defined(__APPLE__) && !defined(__OpenBSD__) | |
73 | +#ifdef __FreeBSD__ | |
66 | 74 | #include <libutil.h> |
67 | -#endif | |
68 | -#ifdef __OpenBSD__ | |
69 | -#include <net/if.h> | |
75 | +#else | |
76 | +#include <util.h> | |
70 | 77 | #endif |
71 | 78 | #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) |
72 | 79 | #include <freebsd/stdlib.h> |
73 | 80 | #else |
74 | 81 | #ifdef __linux__ |
75 | -#include <linux/if.h> | |
76 | -#include <linux/if_tun.h> | |
77 | 82 | #include <pty.h> |
78 | 83 | #include <malloc.h> |
79 | 84 | #include <linux/rtc.h> | ... | ... |
qemu-char.c
... | ... | @@ -45,25 +45,31 @@ |
45 | 45 | #include <termios.h> |
46 | 46 | #include <sys/mman.h> |
47 | 47 | #include <sys/ioctl.h> |
48 | +#include <sys/resource.h> | |
48 | 49 | #include <sys/socket.h> |
49 | 50 | #include <netinet/in.h> |
51 | +#include <net/if.h> | |
52 | +#ifdef __NetBSD__ | |
53 | +#include <net/if_tap.h> | |
54 | +#endif | |
55 | +#ifdef __linux__ | |
56 | +#include <linux/if_tun.h> | |
57 | +#endif | |
58 | +#include <arpa/inet.h> | |
50 | 59 | #include <dirent.h> |
51 | 60 | #include <netdb.h> |
52 | 61 | #include <sys/select.h> |
53 | -#include <arpa/inet.h> | |
54 | 62 | #ifdef _BSD |
55 | 63 | #include <sys/stat.h> |
56 | -#if !defined(__APPLE__) && !defined(__OpenBSD__) | |
64 | +#ifdef __FreeBSD__ | |
57 | 65 | #include <libutil.h> |
58 | -#endif | |
59 | -#ifdef __OpenBSD__ | |
60 | -#include <net/if.h> | |
66 | +#else | |
67 | +#include <util.h> | |
61 | 68 | #endif |
62 | 69 | #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) |
63 | 70 | #include <freebsd/stdlib.h> |
64 | 71 | #else |
65 | 72 | #ifdef __linux__ |
66 | -#include <linux/if.h> | |
67 | 73 | #include <pty.h> |
68 | 74 | |
69 | 75 | #include <linux/ppdev.h> | ... | ... |
vl.c
... | ... | @@ -55,26 +55,31 @@ |
55 | 55 | #include <termios.h> |
56 | 56 | #include <sys/mman.h> |
57 | 57 | #include <sys/ioctl.h> |
58 | +#include <sys/resource.h> | |
58 | 59 | #include <sys/socket.h> |
59 | 60 | #include <netinet/in.h> |
61 | +#include <net/if.h> | |
62 | +#if defined(__NetBSD__) | |
63 | +#include <net/if_tap.h> | |
64 | +#endif | |
65 | +#ifdef __linux__ | |
66 | +#include <linux/if_tun.h> | |
67 | +#endif | |
68 | +#include <arpa/inet.h> | |
60 | 69 | #include <dirent.h> |
61 | 70 | #include <netdb.h> |
62 | 71 | #include <sys/select.h> |
63 | -#include <arpa/inet.h> | |
64 | 72 | #ifdef _BSD |
65 | 73 | #include <sys/stat.h> |
66 | -#if !defined(__APPLE__) && !defined(__OpenBSD__) | |
74 | +#ifdef __FreeBSD__ | |
67 | 75 | #include <libutil.h> |
68 | -#endif | |
69 | -#ifdef __OpenBSD__ | |
70 | -#include <net/if.h> | |
76 | +#else | |
77 | +#include <util.h> | |
71 | 78 | #endif |
72 | 79 | #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) |
73 | 80 | #include <freebsd/stdlib.h> |
74 | 81 | #else |
75 | 82 | #ifdef __linux__ |
76 | -#include <linux/if.h> | |
77 | -#include <linux/if_tun.h> | |
78 | 83 | #include <pty.h> |
79 | 84 | #include <malloc.h> |
80 | 85 | #include <linux/rtc.h> | ... | ... |