kAudioObjectPropertyElementMain is the macOS 12 rename of kAudioObjectPropertyElementMaster; older SDKs declare only the latter, so qemu 11.1.0 fails on macOS 11 and earlier with an undeclared identifier. This is an enum constant, so the question is purely whether the SDK declares it; the guard therefore tests MAC_OS_X_VERSION_MAX_ALLOWED. Contrast the IOMainPort patch, where the symbol is a function and the deployment target is what matters. --- audio/coreaudio.m.orig +++ audio/coreaudio.m @@ -24,6 +24,13 @@ #include "qemu/osdep.h" #include + +/* kAudioObjectPropertyElementMain is the macOS 12 rename of + * kAudioObjectPropertyElementMaster; older SDKs declare only the latter. */ +#if !defined(MAC_OS_VERSION_12_0) || \ + MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_VERSION_12_0 +#define kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster +#endif #include /* pthread_X */ #include "qemu/main-loop.h"