From 553ec11ec06fbe0beebfbb45f9dc3c9eabd83d28 Mon Sep 17 00:00:00 2001 From: Catherine Date: Mon, 14 Jul 2025 23:51:04 +0100 Subject: [PATCH] Make compatible with WASI (#4497) WASI is a POSIX subset that doesn't have `dup`, `dup2`, or `pipe` system calls. Fixes #4496. --- include/fmt/os.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fmt/os.h b/include/fmt/os.h index b2cc5e4b..40cdcdd4 100644 --- a/include/fmt/os.h +++ b/include/fmt/os.h @@ -29,7 +29,8 @@ # if (FMT_HAS_INCLUDE() || defined(__APPLE__) || \ defined(__linux__)) && \ (!defined(WINAPI_FAMILY) || \ - (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)) + (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)) && \ + !defined(__wasm__) # include // for O_RDONLY # define FMT_USE_FCNTL 1 # else