From 901fbdad1b83678b6367ad0d06d0088bc46aad33 Mon Sep 17 00:00:00 2001 From: "Scott J. Goldman" Date: Mon, 7 May 2012 00:05:02 -0700 Subject: [PATCH] Define explicit _WIN32_WINNT version in makefile Previously, it was defined in netops.c, but it's also needed in one of the clar tests, so I figured we might as well just make it global for the whole project. Without it, the mingw32 linker won't resolve GetProcessId() (called from the core/errors.c clar test) because of some conditionals in windows.h. --- CMakeLists.txt | 2 +- src/netops.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bfd21b73..fbc222d5c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,7 +96,7 @@ FILE(GLOB SRC_H include/git2/*.h) # On Windows use specific platform sources IF (WIN32 AND NOT CYGWIN) - ADD_DEFINITIONS(-DWIN32 -D_DEBUG) + ADD_DEFINITIONS(-DWIN32 -D_DEBUG -D_WIN32_WINNT=0x0501) FILE(GLOB SRC src/*.c src/transports/*.c src/xdiff/*.c src/win32/*.c) ELSE() FILE(GLOB SRC src/*.c src/transports/*.c src/xdiff/*.c src/unix/*.c) diff --git a/src/netops.c b/src/netops.c index 2d200002f..057aff887 100644 --- a/src/netops.c +++ b/src/netops.c @@ -11,7 +11,6 @@ # include # include #else -# define _WIN32_WINNT 0x0501 # include # include # ifdef _MSC_VER