Commit 403935b
committed
Fix missing <cstdlib> 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 `<cstdlib>` to be explicitly included to use standard memory allocation functions like `realloc`. This commit adds the missing header alongside `<stdio.h>` to resolve the build failure and ensure cross-platform compatibility.1 parent 9ae37ac commit 403935b
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
0 commit comments