From 403935b1d85a5ab042dc8d8622b5753a32dc3bd2 Mon Sep 17 00:00:00 2001 From: Samy Sadi Date: Mon, 30 Mar 2026 07:39:43 +0000 Subject: [PATCH] Fix missing include for Emscripten web builds Compiling `godot-cpp` for the Web platform (`wasm32`) using Emscripten currently fails in `src/godot.cpp` with the following error: `error: use of undeclared identifier 'realloc'` Unlike, for instance, GCC on Linux, Emscripten's Clang compiler strictly requires `` to be explicitly included to use standard memory allocation functions like `realloc`. This commit adds the missing header alongside `` to resolve the build failure and ensure cross-platform compatibility. --- src/godot.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/godot.cpp b/src/godot.cpp index c1b27790d..5ffc75838 100644 --- a/src/godot.cpp +++ b/src/godot.cpp @@ -41,6 +41,7 @@ #include #include +#include namespace godot {