summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dimitry@andric.com>2016-08-02 06:44:37 +0000
committerDimitry Andric <dimitry@andric.com>2016-08-02 06:44:37 +0000
commit85cd828f87c0800e698b8d62334b2e1270375307 (patch)
tree42c7a77ff97354bb5f3678727e1e5896ae26bec3
parentbb816f8d4a9d0f8a47f701ef9019b23e7ea72776 (diff)
downloadcompiler-rt-85cd828f87c0800e698b8d62334b2e1270375307.tar.gz
Merging r277300:
------------------------------------------------------------------------ r277300 | dim | 2016-07-31 22:16:59 +0200 (Sun, 31 Jul 2016) | 5 lines Fix ASan alloca_constant_size.cc test on FreeBSD. On FreeBSD <alloca.h> does not exist: alloca(3) is defined in <stdlib.h> instead. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@277424 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/asan/TestCases/alloca_constant_size.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/asan/TestCases/alloca_constant_size.cc b/test/asan/TestCases/alloca_constant_size.cc
index 61f6da710..a766ae75b 100644
--- a/test/asan/TestCases/alloca_constant_size.cc
+++ b/test/asan/TestCases/alloca_constant_size.cc
@@ -10,6 +10,8 @@
// MSVC provides _alloca instead of alloca.
#if defined(_MSC_VER) && !defined(alloca)
# define alloca _alloca
+#elif defined(__FreeBSD__)
+#include <stdlib.h>
#else
#include <alloca.h>
#endif