Skip to content

Commit 9ca8039

Browse files
kusmadscho
authored andcommitted
MSVC: fix poll-related macro redefines
This seems to be related to the poll-emulation... I see that these things are guarded by an "#if(_WIN32_WINNT >= 0x0600)" in <winsock2.h>, which means it's supported for Windows Vista and above... We still support Windows XP, so it seems someone has set this too high :) I'd prefer to set this from the Makefile, but this generates a warning in compat/win32/poll.c about redefining a macro (poll.c wants it to be 0x502, which is Windows XP with SP2, rather than 0x501 which is normal Windows XP). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 0a6d148 commit 9ca8039

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

compat/mingw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#define _WIN32_WINNT 0x0501
12
#include <winsock2.h>
23
#include <ws2tcpip.h>
34

git-compat-util.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
#define _SGI_SOURCE 1
8686

8787
#ifdef WIN32 /* Both MinGW and MSVC */
88+
#define _WIN32_WINNT 0x0501
8889
#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */
8990
#include <winsock2.h>
9091
#include <windows.h>

0 commit comments

Comments
 (0)