Multiprocessing Services is very deprecated, it's hard to know if that call is still necessary or not but safer to keep it in (and suppress the warning). kIOMasterPortDefault was replaced with kIOMainPortDefault in Monterey but they're both equivalent to NULL/0 (using NULL triggers a warning though).
From: Brendan Shanks bshanks@codeweavers.com
--- dlls/ntdll/unix/loader.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 3295f7f918b..79fa5b39599 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -2358,10 +2358,13 @@ static void apple_main_thread(void)
if (!pthread_main_np()) return;
+#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" /* Multi-processing Services can get confused about the main thread if the * first time it's used is on a secondary thread. Use it here to make sure * that doesn't happen. */ MPTaskIsPreemptive(MPCurrentTaskID()); +#pragma clang diagnostic pop
/* Give ourselves the best chance of having the distributed notification * center scheduled on this thread's run loop. In theory, it's scheduled
From: Brendan Shanks bshanks@codeweavers.com
--- dlls/ntdll/unix/cdrom.c | 2 +- dlls/ntdll/unix/system.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/unix/cdrom.c b/dlls/ntdll/unix/cdrom.c index a9385daf099..a4a9400a518 100644 --- a/dlls/ntdll/unix/cdrom.c +++ b/dlls/ntdll/unix/cdrom.c @@ -367,7 +367,7 @@ static NTSTATUS get_parent_device( int fd, char *name, size_t len )
CFDictionaryAddValue( dict, CFSTR("Removable"), kCFBooleanTrue );
- service = IOServiceGetMatchingService( kIOMasterPortDefault, dict ); + service = IOServiceGetMatchingService( 0, dict );
/* now look for the parent that has the "Whole" attribute set to TRUE */
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 4ca07c2e34c..ba2051da65e 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -1632,7 +1632,7 @@ static NTSTATUS get_smbios_from_iokit( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, struct smbios_prologue *prologue; BYTE major_version = 2, minor_version = 0;
- if (!(service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleSMBIOS")))) + if (!(service = IOServiceGetMatchingService(0, IOServiceMatching("AppleSMBIOS")))) { WARN("can't find AppleSMBIOS service\n"); return STATUS_NO_MEMORY; @@ -1727,7 +1727,7 @@ static NTSTATUS generate_smbios( SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG struct smbios_board_args board_args; struct smbios_chassis_args chassis_args;
- platform_expert = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice")); + platform_expert = IOServiceGetMatchingService(0, IOServiceMatching("IOPlatformExpertDevice")); if (!platform_expert) return STATUS_NO_MEMORY;
@@ -3493,7 +3493,7 @@ static NTSTATUS fill_battery_state( SYSTEM_BATTERY_STATE *bs ) uint32_t value, voltage; CFTimeInterval remain;
- if (IOPMCopyBatteryInfo( kIOMasterPortDefault, &batteries ) != kIOReturnSuccess) + if (IOPMCopyBatteryInfo( 0, &batteries ) != kIOReturnSuccess) return STATUS_ACCESS_DENIED;
if (CFArrayGetCount( batteries ) == 0)