# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/wasi-libcxx/hotfix-wasi-locale.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- libc++ has no WASI branch in the locale platform dispatch and falls back to the legacy ibm.h shims, whose inline strtod_l/vasprintf definitions conflict with the declarations of the musl-derived wasi-libc. Use the glibc/musl support header for WASI, too. Signed-off-by: René Rebe --- ./libcxx/include/__locale_dir/locale_base_api.h.vanilla 2026-08-30 13:56:39.290466162 +0200 +++ ./libcxx/include/__locale_dir/locale_base_api.h 2026-08-30 13:56:42.485495940 +0200 @@ -122,7 +122,7 @@ # include <__locale_dir/support/fuchsia.h> # elif _LIBCPP_LIBC_LLVM_LIBC # include <__locale_dir/support/llvm_libc.h> -# elif defined(__linux__) +# elif defined(__linux__) || defined(__wasi__) # include <__locale_dir/support/linux.h> # elif _LIBCPP_LIBC_NEWLIB # include <__locale_dir/support/newlib.h>