Commit cb4b976b82749b29ca6731d47e3a3237b32f9497
1 parent
8c05dbf9
Move network related includes to vl.c to help SLIRP-less builds.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3167 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
5 additions
and
9 deletions
slirp/libslirp.h
| 1 | #ifndef _LIBSLIRP_H | 1 | #ifndef _LIBSLIRP_H |
| 2 | #define _LIBSLIRP_H | 2 | #define _LIBSLIRP_H |
| 3 | 3 | ||
| 4 | -#ifdef _WIN32 | ||
| 5 | -#include <winsock2.h> | ||
| 6 | -int inet_aton(const char *cp, struct in_addr *ia); | ||
| 7 | -#else | ||
| 8 | -#include <sys/select.h> | ||
| 9 | -#include <arpa/inet.h> | ||
| 10 | -#endif | ||
| 11 | - | ||
| 12 | #ifdef __cplusplus | 4 | #ifdef __cplusplus |
| 13 | extern "C" { | 5 | extern "C" { |
| 14 | #endif | 6 | #endif |
vl.c
| @@ -42,6 +42,8 @@ | @@ -42,6 +42,8 @@ | ||
| 42 | #include <netinet/in.h> | 42 | #include <netinet/in.h> |
| 43 | #include <dirent.h> | 43 | #include <dirent.h> |
| 44 | #include <netdb.h> | 44 | #include <netdb.h> |
| 45 | +#include <sys/select.h> | ||
| 46 | +#include <arpa/inet.h> | ||
| 45 | #ifdef _BSD | 47 | #ifdef _BSD |
| 46 | #include <sys/stat.h> | 48 | #include <sys/stat.h> |
| 47 | #ifndef __APPLE__ | 49 | #ifndef __APPLE__ |
| @@ -63,7 +65,6 @@ | @@ -63,7 +65,6 @@ | ||
| 63 | #include <sys/stat.h> | 65 | #include <sys/stat.h> |
| 64 | #include <sys/ethernet.h> | 66 | #include <sys/ethernet.h> |
| 65 | #include <sys/sockio.h> | 67 | #include <sys/sockio.h> |
| 66 | -#include <arpa/inet.h> | ||
| 67 | #include <netinet/arp.h> | 68 | #include <netinet/arp.h> |
| 68 | #include <netinet/in.h> | 69 | #include <netinet/in.h> |
| 69 | #include <netinet/in_systm.h> | 70 | #include <netinet/in_systm.h> |
| @@ -76,6 +77,9 @@ | @@ -76,6 +77,9 @@ | ||
| 76 | #include <stropts.h> | 77 | #include <stropts.h> |
| 77 | #endif | 78 | #endif |
| 78 | #endif | 79 | #endif |
| 80 | +#else | ||
| 81 | +#include <winsock2.h> | ||
| 82 | +int inet_aton(const char *cp, struct in_addr *ia); | ||
| 79 | #endif | 83 | #endif |
| 80 | 84 | ||
| 81 | #if defined(CONFIG_SLIRP) | 85 | #if defined(CONFIG_SLIRP) |