浏览代码

Fix alloca() not being included on some platforms

Marc Gilleron 5 年之前
父节点
当前提交
9e37b873af
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      include/core/Defs.hpp

+ 5 - 0
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