Fix ASan alloca_constant_size.cc test on FreeBSD.

On FreeBSD <alloca.h> does not exist: alloca(3) is defined in <stdlib.h>
instead.

llvm-svn: 277300
This commit is contained in:
Dimitry Andric 2016-07-31 20:16:59 +00:00
parent 6be48e4aa7
commit 41d9b3640c

View File

@ -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