summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_wrapper_malloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/kmp_wrapper_malloc.h')
-rw-r--r--openmp/runtime/src/kmp_wrapper_malloc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_wrapper_malloc.h b/openmp/runtime/src/kmp_wrapper_malloc.h
index b690c515651..c8d2c70c809 100644
--- a/openmp/runtime/src/kmp_wrapper_malloc.h
+++ b/openmp/runtime/src/kmp_wrapper_malloc.h
@@ -93,7 +93,9 @@
// Include alloca() declaration.
#if KMP_OS_WINDOWS
#include <malloc.h> // Windows* OS: _alloca() declared in "malloc.h".
+#if KMP_MSVC_COMPAT
#define alloca _alloca // Allow to use alloca() with no underscore.
+#endif
#elif KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_OPENBSD
// Declared in "stdlib.h".
#elif KMP_OS_UNIX
OpenPOWER on IntegriCloud