From 5ea683f20275bf2cae4eaaec8fa85f269706810b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B0=E6=97=A0=E6=AD=A2=E7=AB=9E=E5=8D=9A=E5=AE=A2?= <648318466@qq.com> Date: Tue, 24 Mar 2020 19:17:00 +0800 Subject: [PATCH] Fix ncnn error in MinGW compilation of windows system (#1645) --- src/platform.h.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform.h.in b/src/platform.h.in index 707b10af0..804c218a8 100644 --- a/src/platform.h.in +++ b/src/platform.h.in @@ -25,7 +25,7 @@ #cmakedefine01 NCNN_REQUANT #cmakedefine01 NCNN_AVX2 -#ifdef _WIN32 +#if (defined _WIN32 && !(defined __MINGW32__)) #define WIN32_LEAN_AND_MEAN #include #include @@ -39,7 +39,7 @@ namespace ncnn { -#ifdef _WIN32 +#if (defined _WIN32 && !(defined __MINGW32__)) class Mutex { public: @@ -75,7 +75,7 @@ private: Mutex& mutex; }; -#if _WIN32 +#if (defined _WIN32 && !(defined __MINGW32__)) class ConditionVariable { public: @@ -101,7 +101,7 @@ private: }; #endif // _WIN32 -#if _WIN32 +#if (defined _WIN32 && !(defined __MINGW32__)) static unsigned __stdcall start_wrapper(void* args); class Thread {