Skip to content

Commit 7c4971d

Browse files
authored
Update Socket.cpp (#1152)
1 parent ff58bcf commit 7c4971d

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/hx/libs/std/Socket.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
#ifdef __GNUC__
1111
// Mingw / gcc on windows
12+
#ifndef _WIN32_WINNT
1213
#define _WIN32_WINNT 0x0501
14+
#endif
1315
#include <winsock2.h>
1416
#include <ws2tcpip.h>
1517
#else
@@ -19,14 +21,9 @@
1921
#include <Ws2tcpip.h>
2022
#endif
2123

22-
2324
#define DYNAMIC_INET_FUNCS 1
24-
typedef WINSOCK_API_LINKAGE INT (WSAAPI *inet_pton_func)( INT Family, PCSTR pszAddrString, PVOID pAddrBuf);
25-
typedef WINSOCK_API_LINKAGE PCSTR (WSAAPI *inet_ntop_func)(INT Family, PVOID pAddr, PSTR pStringBuf, size_t StringBufSize);
26-
27-
28-
29-
25+
typedef INT (WSAAPI *inet_pton_func)( INT Family, PCSTR pszAddrString, PVOID pAddrBuf);
26+
typedef PCSTR (WSAAPI *inet_ntop_func)(INT Family, PVOID pAddr, PSTR pStringBuf, size_t StringBufSize);
3027

3128
# define FDSIZE(n) (sizeof(u_int) + (n) * sizeof(SOCKET))
3229
# define SHUT_WR SD_SEND

0 commit comments

Comments
 (0)