[test] [runtime] Do not include alloca.h on NetBSD
authorMichal Gorny <mgorny@gentoo.org>
Tue, 11 Dec 2018 15:39:30 +0000 (15:39 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Tue, 11 Dec 2018 15:39:30 +0000 (15:39 +0000)
On NetBSD, alloca() is in stdlib.h and there is no alloca.h.  Adjust
the includes appopriately.

Differential Revision: https://reviews.llvm.org/D55487

llvm-svn: 348856

openmp/runtime/test/ompt/misc/interoperability.cpp

index 102e6de..b07814e 100644 (file)
@@ -3,7 +3,11 @@
 
 #include <iostream>
 #include <thread>
+#if !defined(__NetBSD__)
 #include <alloca.h>
+#else
+#include <cstdlib>
+#endif
 
 #include "callback.h"
 #include "omp.h"