Skip to content

Commit c2919e4

Browse files
committed
Auto detect NTDDI_VERSION whether need enable COMPAT_GAI
1 parent c043a6a commit c2919e4

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

yasio/config.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,6 @@ SOFTWARE.
8787
*/
8888
// #define YASIO_ENABLE_UDS 1
8989

90-
/*
91-
** Uncomment or add compiler flag -DYASIO_NT_COMPAT_GAI for compatible with Windows XP
92-
** see: https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo
93-
*/
94-
// #define YASIO_NT_COMPAT_GAI 1
95-
9690
/*
9791
** Uncomment or add compiler flag -DYASIO_NT_XHRES_TIMER to forcing use undocumented NT API to setup high-resolution timer
9892
*/

yasio/impl/socket.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ SOFTWARE.
4747
# include <Mswsock.h>
4848
# include <Mstcpip.h>
4949
# include <Ws2tcpip.h>
50-
# if defined(YASIO_NT_COMPAT_GAI)
50+
# if NTDDI_VERSION < NTDDI_VISTA
5151
# include <Wspiapi.h>
5252
# endif
5353
# if YASIO__HAS_UDS

0 commit comments

Comments
 (0)