mirror of https://github.com/xqemu/xqemu.git
slirp: improve windows headers inclusion
Our API usage requires Vista, set WIN32_LEAN_AND_MEAN to fix a number of issues (winsock2.h include order for ex, which is better to include first for legacy reasons). While at it, group redundants #ifndef _WIN32 blocks. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
parent
35ee75f343
commit
ba1be96531
|
@ -3,10 +3,19 @@
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
/* as defined in sdkddkver.h */
|
||||||
|
#ifndef _WIN32_WINNT
|
||||||
|
#define _WIN32_WINNT 0x0600 /* Vista */
|
||||||
|
#endif
|
||||||
|
/* reduces the number of implicitly included headers */
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef char *caddr_t;
|
typedef char *caddr_t;
|
||||||
|
|
||||||
# include <windows.h>
|
|
||||||
# include <winsock2.h>
|
# include <winsock2.h>
|
||||||
|
# include <windows.h>
|
||||||
# include <ws2tcpip.h>
|
# include <ws2tcpip.h>
|
||||||
# include <sys/timeb.h>
|
# include <sys/timeb.h>
|
||||||
# include <iphlpapi.h>
|
# include <iphlpapi.h>
|
||||||
|
@ -19,19 +28,10 @@ typedef char *caddr_t;
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
# include <sys/ioctl.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
Loading…
Reference in New Issue