mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-23 19:29:18 +00:00
ws2 defines and missing prototypes for building withmingw32
This commit is contained in:
parent
d3b56d8e32
commit
2f9bc272be
@ -2,7 +2,16 @@
|
||||
#define _LIBSLIRP_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef __MINGW32__
|
||||
#if _WIN32_WINNT < 0x501
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x501
|
||||
#endif
|
||||
#endif
|
||||
#include <winsock2.h>
|
||||
#ifdef __MINGW32__
|
||||
#include <WS2tcpip.h>
|
||||
#endif
|
||||
int inet_aton(const char *cp, struct in_addr *ia);
|
||||
#else
|
||||
#include <sys/select.h>
|
||||
|
@ -22,8 +22,30 @@ typedef char *caddr_t;
|
||||
typedef int socklen_t;
|
||||
typedef unsigned long ioctlsockopt_t;
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#if _WIN32_WINNT < 0x501
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x501
|
||||
#endif
|
||||
#endif
|
||||
# include <winsock2.h>
|
||||
# include <WS2tcpip.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
char * WSAAPI inet_ntop(
|
||||
INT Family,
|
||||
PVOID pAddr,
|
||||
PTSTR pStringBuf,
|
||||
size_t StringBufSize
|
||||
);
|
||||
|
||||
INT WSAAPI inet_pton(
|
||||
INT Family,
|
||||
const char * pszAddrString,
|
||||
PVOID pAddrBuf
|
||||
);
|
||||
#endif
|
||||
|
||||
# include <sys/timeb.h>
|
||||
# include <iphlpapi.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user