Fix build on MinGW
authorKonstantin Ritt <ritt.ks@gmail.com>
Tue, 2 Dec 2014 15:33:39 +0000 (19:33 +0400)
committerKonstantin Ritt <ritt.ks@gmail.com>
Sun, 28 Dec 2014 17:46:59 +0000 (18:46 +0100)
- alloca() needs malloc.h
- crtdbg.h couldn't be found on MinGW

Change-Id: Ibbf91a58d39ef1e2572baae3c409393acf7aa5df
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/jit/qv4regalloc.cpp
tools/qmlplugindump/main.cpp

index 16792d8..330714d 100644 (file)
@@ -37,6 +37,9 @@
 #include <private/qv4value_inl_p.h>
 
 #include <algorithm>
+#if defined(Q_CC_MINGW)
+#  include <malloc.h>
+#endif
 
 namespace {
 enum { DebugRegAlloc = 0 };
index b387e4f..36af41c 100644 (file)
@@ -62,7 +62,9 @@
 #include <signal.h>
 #endif
 #ifdef Q_OS_WIN
-#include <crtdbg.h>
+#  if !defined(Q_CC_MINGW)
+#    include <crtdbg.h>
+#  endif
 #include <qt_windows.h>
 #endif