daml/bazel_tools/grpc-bazel-mingw.patch
Gaël Deest 2572eca983
Build gRPC on Windows with GHC's internal Mingw toolchain (#284)
* Adding patch to get GRPC to build on Windows with GHC's MingW

* Build gRPC on Windows CI
2019-04-08 15:32:46 +02:00

23 lines
798 B
Diff

diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h
index 0349e31bb3..d2e7408dbf 100644
--- a/include/grpc/impl/codegen/port_platform.h
+++ b/include/grpc/impl/codegen/port_platform.h
@@ -39,15 +39,9 @@
#define NOMINMAX
#endif /* NOMINMAX */
-#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) */
+/* FIXME: Force-define Windows version to Windows 10 before including windows.h */
+#define WINVER 0x0A00
+#define _WIN32_WINNT 0x0A00
#include <windows.h>