On Tue May 2 18:58:08 2023 +0000, Huw Davies wrote:
This is producing an error on macOS 10.14
gcc -m32 -c -o dlls/winecoreaudio.drv/coreaudio.o dlls/winecoreaudio.drv/coreaudio.c -Idlls/winecoreaudio.drv -Idlls/mmdevapi \ -Iinclude -D__WINESRC__ -DWINE_UNIX_LIB -Wall -pipe -fno-stack-protector -fno-strict-aliasing \ -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self -Wno-pragma-pack \ -Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings -Wpointer-arith -gdwarf-4 -fPIC \ -fasynchronous-unwind-tables -O2 -g -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 dlls/winecoreaudio.drv/coreaudio.c:1674:9: error: use of undeclared identifier 'kAudioObjectPropertyElementMain'; did you mean 'kAudioObjectPropertyElementName'? kAudioObjectPropertyElementMain
It looks like QEMU has the following (in `audio/coreaudio.m`)
#if !defined(MAC_OS_VERSION_12_0) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_12_0) #define kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster #endif
From CI:
```c ../dlls/winecoreaudio.drv/coreaudio.c:216:21: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations] addr.mElement = kAudioObjectPropertyElementMaster; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kAudioObjectPropertyElementMain /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain ^ ```
For consistency I would just use `kAudioObjectPropertyElementMaster`, we can then eventually create a merge request to fix all deprecation warnings. There are quite a few across the codebase, some of which introduced with macOS 10.7.