IOMainPort() is the macOS 12 rename of IOMasterPort(); older SDKs declare only the latter, so qemu 11.1.0 fails on macOS 11 and earlier. The signatures are identical, so aliasing suffices. The guard tests MAC_OS_X_VERSION_MIN_REQUIRED rather than MAX_ALLOWED: a binary deployed to macOS 11 must not call a macOS 12 symbol even when built against a newer SDK. See https://trac.macports.org/ticket/72042 --- block/file-posix.c.orig +++ block/file-posix.c @@ -58,6 +58,13 @@ #include //#include #include + +/* IOMainPort is the macOS 12 rename of IOMasterPort; older SDKs (e.g. 10.15) + * declare only the latter. Same signature, so alias it. */ +#if !defined(MAC_OS_VERSION_12_0) || \ + MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_12_0 +#define IOMainPort IOMasterPort +#endif #include #endif