From 6e588b25233cba16a5de8019c067198bb57ab454 Mon Sep 17 00:00:00 2001 From: Rob Knopf Date: Mon, 30 Nov 2026 19:59:07 -0500 Subject: [PATCH] Include what the wasm runtime uses, so it builds with Emscripten 7 Array.h uses std::is_pod and PosixCommon.cpp uses errno, but neither included the header that declares it; both came in through other headers. The libc++ in Emscripten 7 no longer pulls them in that way, so wasm/build_wasm.sh failed with "no template named 'is_pod'" and "use of undeclared identifier 'errno'" in 9 of its 14 sources. Array.h now includes and PosixCommon.cpp includes . Every runtime source compiles with Emscripten 7.0.1 and 5.0.7, with and without -pthread. --- BeefySysLib/platform/posix/PosixCommon.cpp | 1 + BeefySysLib/util/Array.h | 1 + 2 files changed, 2 insertions(+) diff --git a/BeefySysLib/platform/posix/PosixCommon.cpp b/BeefySysLib/platform/posix/PosixCommon.cpp index 0419b2ea3..44e638c5d 100644 --- a/BeefySysLib/platform/posix/PosixCommon.cpp +++ b/BeefySysLib/platform/posix/PosixCommon.cpp @@ -1,6 +1,7 @@ #include "Common.h" #include "BFPlatform.h" #include +#include #include #include #ifdef BF_PLATFORM_LINUX diff --git a/BeefySysLib/util/Array.h b/BeefySysLib/util/Array.h index 6d8c1e852..fb5e2dd86 100644 --- a/BeefySysLib/util/Array.h +++ b/BeefySysLib/util/Array.h @@ -1,6 +1,7 @@ #pragma once #include "BFPlatform.h" +#include NS_BF_BEGIN;