From 6171a2be743e466edc53eccf600253adccd7599b Mon Sep 17 00:00:00 2001 From: David Date: Sat, 3 Oct 2026 16:28:20 +0400 Subject: [PATCH] std.Io.Threaded: only use spawnDarwin in processReplace when spawning is supported ios, tvos, visionos and watchos can't spawn processes, so their null_file has no fd and spawnDarwin doesn't compile for them. The vtable always references processReplace and the default panic handler uses Threaded, so nearly every program for these targets failed to compile. Fall back to posixExec there, as before 9fe0ebe108. closes https://codeberg.org/ziglang/zig/issues/37061 --- lib/std/Io/Threaded.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig index 77506faae7e9f30f792cd840c8ac6ba347c89b4d..f7ab012863292c7e8b1ddb6f99a382c1eb1e56e3 100644 --- a/lib/std/Io/Threaded.zig +++ b/lib/std/Io/Threaded.zig @@ -15214,7 +15214,7 @@ fn processReplace(userdata: ?*anyopaque, options: process.ReplaceOptions) proces }); }; - if (is_darwin) if (t.spawnDarwin( + if (is_darwin and process.can_spawn) if (t.spawnDarwin( .replace, options.exe, argv_buf.ptr, -- 2.54.0