diff --git a/src/win/core.c b/src/win/core.c index e1a77655..f2ffd7b0 100644 --- a/src/win/core.c +++ b/src/win/core.c @@ -26,7 +26,9 @@ #include #include #include +#if !defined(__MINGW32__) #include +#endif #include "uv.h" #include "internal.h" @@ -42,7 +44,7 @@ static uv_once_t uv_init_guard_ = UV_ONCE_INIT; static uv_once_t uv_default_loop_init_guard_ = UV_ONCE_INIT; -#ifdef _DEBUG +#if defined(_DEBUG) && !defined(__MINGW32__) /* Our crt debug report handler allows us to temporarily disable asserts */ /* just for the current thread. */ @@ -89,7 +91,7 @@ static void uv_init(void) { /* We also need to setup our debug report handler because some CRT */ /* functions (eg _get_osfhandle) raise an assert when called with invalid */ /* FDs even though they return the proper error code in the release build. */ -#ifdef _DEBUG +#if defined(_DEBUG) && !defined(__MINGW32__) _CrtSetReportHook(uv__crt_dbg_report_handler); #endif