From adae02b6514ae186f797e01611c35ed1d843f256 Mon Sep 17 00:00:00 2001
From: Alexpux <alexey.pawlow@gmail.com>
Date: Sun, 23 Nov 2014 09:27:40 +0300
Subject: [PATCH 23/27] mod_loader: mingw always link to msvcrt.dll

---
 src/jrd/os/win32/mod_loader.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/jrd/os/win32/mod_loader.cpp b/src/jrd/os/win32/mod_loader.cpp
index aeae4c2bd5..004625336d 100644
--- a/src/jrd/os/win32/mod_loader.cpp
+++ b/src/jrd/os/win32/mod_loader.cpp
@@ -74,7 +74,7 @@ public:
 // if we don't use MSVC then we don't use MS CRT ?
 // NS: versions of MSVC before 2005 and, as preliminary reports suggest,
 // after 2008 do not need this hack
-#if !defined(_MSC_VER) || (_MSC_VER < 1400)
+#if (!defined(_MSC_VER) || (_MSC_VER < 1400)) && !defined(__MINGW32__)
 		return;
 #else
 
@@ -89,7 +89,9 @@ public:
 		if ((*mFindActCtxSectionString)
 				(0, NULL,
 				ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION,
-#if _MSC_VER == 1400
+#if defined(__MINGW32__)
+                    "msvcrt.dll",
+#elif _MSC_VER == 1400
                     "msvcr80.dll",
 #elif _MSC_VER == 1500
                     "msvcr90.dll",
-- 
2.13.0

