diff --git a/include/grpc/support/port_platform.h b/include/grpc/support/port_platform.h index 57fed18cf68..d257164547a 100644 --- a/include/grpc/support/port_platform.h +++ b/include/grpc/support/port_platform.h @@ -46,10 +46,11 @@ #define NOMINMAX #endif /* NOMINMAX */ -#if defined(_WIN32_WINNT) -#if _WIN32_WINNT < 0x0600 -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0600 +#ifndef _WIN32_WINNT +#error "Please compile grpc with _WIN32_WINNT of at least 0x600 (aka Windows Vista)" +#else /* !defined(_WIN32_WINNT) */ +#if (_WIN32_WINNT < 0x0600) +#error "Please compile grpc with _WIN32_WINNT of at least 0x600 (aka Windows Vista)" #endif /* _WIN32_WINNT < 0x0600 */ #endif /* defined(_WIN32_WINNT) */ diff --git a/vsprojects/global.props b/vsprojects/global.props index 6858bd7b9d4..4647436e9e6 100644 --- a/vsprojects/global.props +++ b/vsprojects/global.props @@ -6,7 +6,7 @@ $(ProjectDir)\..\..;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\third_party\protobuf\src;$(ProjectDir)\..\packages\grpc.dependencies.openssl.1.0.2.2\build\native\include;$(ProjectDir)\..\..\third_party\gflags\include;%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _WIN32_WINNT=0x600;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) EnableAllWarnings