summaryrefslogtreecommitdiffstats
path: root/config.tests/common/alloca/alloca.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests/common/alloca/alloca.cpp')
-rw-r--r--config.tests/common/alloca/alloca.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/config.tests/common/alloca/alloca.cpp b/config.tests/common/alloca/alloca.cpp
index d839b381ef..500bdb9ba2 100644
--- a/config.tests/common/alloca/alloca.cpp
+++ b/config.tests/common/alloca/alloca.cpp
@@ -37,10 +37,17 @@
**
****************************************************************************/
-#include <alloca.h>
-
+#if defined(USE_ALLOCA_H)
+# include <alloca.h>
+# ifdef __QNXNTO__
// extra include needed in QNX7 to define NULL for the alloca() macro
-#include <stdlib.h>
+# include <stddef.h>
+# endif
+#elif defined(USE_MALLOC_H)
+# include <malloc.h>
+#else
+# include <stdlib.h>
+#endif
int main(int, char **)
{