[mlir] Avoid including <alloca.h> on FreeBSD and NetBSD

Instead, include `<cstdlib>` which is the canonical header containing
the declaration of `alloca()`.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D107699
This commit is contained in:
Dimitry Andric 2021-08-07 21:55:19 +02:00
parent 67278b8a90
commit ab4b4684a2
1 changed files with 4 additions and 0 deletions

View File

@ -15,7 +15,11 @@
#include "mlir/ExecutionEngine/CRunnerUtils.h"
#ifndef _WIN32
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <cstdlib>
#else
#include <alloca.h>
#endif
#include <sys/time.h>
#else
#include "malloc.h"