From d8fe70f477d8a99745b69f7650f75eacf96866f9 Mon Sep 17 00:00:00 2001 From: Arkadiy Shapkin Date: Mon, 5 Sep 2016 00:57:49 +0300 Subject: [PATCH] Fix build with MinGW-w64 --- googletest/include/gtest/internal/gtest-port.h | 2 +- googletest/test/gtest-port_test.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 92f4c11c..860aaaf5 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -396,7 +396,7 @@ # include # endif // In order to avoid having to include , use forward declaration -#if GTEST_OS_WINDOWS_MINGW +#if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR) // MinGW defined _CRITICAL_SECTION and _RTL_CRITICAL_SECTION as two // separate (equivalent) structs, instead of using typedef typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION; diff --git a/googletest/test/gtest-port_test.cc b/googletest/test/gtest-port_test.cc index 05f8821e..c5067a40 100644 --- a/googletest/test/gtest-port_test.cc +++ b/googletest/test/gtest-port_test.cc @@ -1295,7 +1295,7 @@ TEST(WindowsTypesTest, HANDLEIsVoidStar) { StaticAssertTypeEq(); } -#if GTEST_OS_WINDOWS_MINGW +#if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR) TEST(WindowsTypesTest, _CRITICAL_SECTIONIs_CRITICAL_SECTION) { StaticAssertTypeEq(); }