From 9e37b873af0de19a2dccd19a7eadd92e3a5e3f62 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Tue, 31 Mar 2020 19:16:45 +0100 Subject: [PATCH] Fix alloca() not being included on some platforms --- include/core/Defs.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/core/Defs.hpp b/include/core/Defs.hpp index fb0a18b3..1b4923e6 100644 --- a/include/core/Defs.hpp +++ b/include/core/Defs.hpp @@ -61,6 +61,11 @@ enum class Error { #include +// alloca() is non-standard. When using MSVC, it's in malloc.h. +#if defined(__linux__) || defined(__APPLE__) || defined(__MINGW32__) +#include +#endif + typedef float real_t; #define CMP_EPSILON 0.00001