mirror of
https://github.com/utmapp/UTM.git
synced 2026-10-12 02:24:01 +00:00
pipe2() and dup3() are new in the 27.0 SDKs and carry __API_AVAILABLE(macos(27.0), ios(27.0), ...). Both meson's has_function() and autoconf's AC_CHECK_FUNCS declare their own prototype rather than including the system header, so they never see that annotation and report the functions present no matter the deployment target. The real call sites do include <unistd.h>, so clang emits a weak import that is NULL on anything older than 27 and the first call branches to zero. That broke every VM start on iOS 26 and below: -[CSMain init] -> g_main_context_new() -> g_wakeup_new() -> g_unix_open_pipe(), which calls pipe2() when glib is configured with HAVE_PIPE2. glib, gio, gettext and libusb all picked it up in every sysroot built with Xcode 27. Tell both configure systems the functions are missing so the existing pipe() + fcntl(FD_CLOEXEC) fallbacks are compiled in instead. Nothing detects dup3() today, but cover it so the next dependency bump cannot reintroduce the same crash. Assisted-by: Claude:claude-opus-5