Skip to content

Commit 3d9f867

Browse files
dschoGit for Windows Build Agent
authored andcommitted
mingw: set _WIN32_WINNT explicitly for Git for Windows
Previously, we only ever declared a target Windows version if compiling with Visual C. Which meant that we were relying on the MinGW headers to guess which Windows version we want to target... Let's be explicit about it, in particular because we actually want to bump the target Windows version to Vista (which we will do in the next commit). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent d0dba10 commit 3d9f867

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-compat-util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
#define _SGI_SOURCE 1
156156

157157
#if defined(WIN32) && !defined(__CYGWIN__) /* Both MinGW and MSVC */
158-
# if defined (_MSC_VER) && !defined(_WIN32_WINNT)
158+
# if !defined(_WIN32_WINNT)
159159
# define _WIN32_WINNT 0x0502
160160
# endif
161161
#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */

0 commit comments

Comments
 (0)