From 082d7361ae54cc9081a7e33ae7bd49949dfb3e08 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 23 May 2017 12:59:14 +0200 Subject: QtQml: Restrict alloca definition to MSVC Fix developer build with MinGW: In file included from memory\qv4mm.cpp:60:0: jsruntime/qv4alloca_p.h:62:0: error: "alloca" redefined [-Werror] # define alloca _alloca ^ In file included from .../mingw32/i686-w64-mingw32/include/stdlib.h:686:0, from .../mingw32/i686-w64-mingw32/include/c++/cstdlib:72, from .../mingw32/i686-w64-mingw32/include/c++/bits/stl_algo.h:59, from .../mingw32/i686-w64-mingw32/include/c++/algorithm:62, from .../qtbase/src/corelib/global/qglobal.h:109, from ...\qtbase\include/QtCore/qglobal.h:1, from jsruntime/qv4global_p.h:54, from jsruntime/qv4engine_p.h:53, from memory\qv4mm.cpp:40: .../mingw32/i686-w64-mingw32/include/malloc.h:183:0: note: this is the location of the previous definition #define alloca(x) __builtin_alloca((x)) Amends change a225bddf67f4786c845193630d4ab20b99a2fc3a. Change-Id: I4a758776dbf78225f62883393eb50b7121297a1b Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4alloca_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime') diff --git a/src/qml/jsruntime/qv4alloca_p.h b/src/qml/jsruntime/qv4alloca_p.h index c21878fa42..1e9f83a90e 100644 --- a/src/qml/jsruntime/qv4alloca_p.h +++ b/src/qml/jsruntime/qv4alloca_p.h @@ -58,7 +58,7 @@ #elif QT_CONFIG(alloca_malloc_h) # include // This does not matter unless compiling in strict standard mode. -# ifdef Q_OS_WIN +# ifdef Q_CC_MSVC # define alloca _alloca # endif #else -- cgit v1.2.3