summaryrefslogtreecommitdiffstats
path: root/include/core/Defs.hpp
diff options
context:
space:
mode:
authorMarc Gilleron <marc.gilleron@gmail.com>2020-03-31 19:16:45 +0100
committerMarc Gilleron <marc.gilleron@gmail.com>2020-03-31 19:16:45 +0100
commit9e37b873af0de19a2dccd19a7eadd92e3a5e3f62 (patch)
tree7b7f4b9cd7b295eb6d065200abcd75eb7b7890f9 /include/core/Defs.hpp
parentc2f765e49c7dd0c86729e6ba17f87c039203bce0 (diff)
downloadredot-cpp-9e37b873af0de19a2dccd19a7eadd92e3a5e3f62.tar.gz
Fix alloca() not being included on some platforms
Diffstat (limited to 'include/core/Defs.hpp')
-rw-r--r--include/core/Defs.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/core/Defs.hpp b/include/core/Defs.hpp
index fb0a18b..1b4923e 100644
--- a/include/core/Defs.hpp
+++ b/include/core/Defs.hpp
@@ -61,6 +61,11 @@ enum class Error {
#include <GodotGlobal.hpp>
+// alloca() is non-standard. When using MSVC, it's in malloc.h.
+#if defined(__linux__) || defined(__APPLE__) || defined(__MINGW32__)
+#include <alloca.h>
+#endif
+
typedef float real_t;
#define CMP_EPSILON 0.00001