msvc: Fix compilation errors in compat/win32/sys/poll.c
authorRamsay Jones <redacted>
Sat, 4 Dec 2010 18:54:28 +0000 (18:54 +0000)
committerJunio C Hamano <redacted>
Thu, 9 Dec 2010 19:13:55 +0000 (11:13 -0800)
commit56fb3ddc89ab94c8b09d178a848cb553b4acf777
treeca56184ca96d75d684fa743c5839cc764176d116
parent89ba4e7c7f71712133d1d3137f811b99ea43dd31
msvc: Fix compilation errors in compat/win32/sys/poll.c

The msvc winsock2.h header file conditionally defines or declares
poll() related symbols which cause many macro redefinition errors,
a struct type redefinition error and syntax errors. These symbols
are defined in support of the WSAPoll() API, new in Windows Vista,
when the symbol _WIN32_WINNT is defined and _WIN32_WINNT >= 0x0600.

In order to avoid the compilation errors, we set _WIN32_WINNT to
0x0502 (which would target Windows Server 2003) prior to including
the winsock2.h header file.

Signed-off-by: Ramsay Jones <redacted>
Acked-by: Erik Faye-Lund <redacted>
Signed-off-by: Junio C Hamano <redacted>
compat/win32/sys/poll.c
git clone https://git.99rst.org/PROJECT