mirror of
https://github.com/git/git.git
synced 2026-02-13 11:21:10 +00:00
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).
[PT: amended to follow 41f2999 "msvc: Fix compilation errors caused by
poll.h emulation" and support both MSVC and mingw]
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Pat Thoyts
parent
eba0ff8a60
commit
8bf5559dbf
@@ -86,9 +86,7 @@
|
||||
#define _SGI_SOURCE 1
|
||||
|
||||
#ifdef WIN32 /* Both MinGW and MSVC */
|
||||
# if defined (_MSC_VER)
|
||||
# define _WIN32_WINNT 0x0502
|
||||
# endif
|
||||
#define _WIN32_WINNT 0x0502
|
||||
#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
|
||||
Reference in New Issue
Block a user