mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 08:10:09 +01:00
asahi: Fix warning building for macOS 12.0
Unnecessary rename that breaks forward compatibility... but Apple says
this is just NULL. Do the simpler thing. Note that the argument is a
mach_port_t, which is a natural_t == uint32_t in userspace... even
though it's a pointer in the kernel. Although Apple's docs claim that
kIOMasterPortDefault is NULL, it's really just 0.
../src/asahi/lib/agx_device.c:290:35: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
IOServiceGetMatchingService(kIOMasterPortDefault, matching);
^~~~~~~~~~~~~~~~~~~~
kIOMainPortDefault
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18121>
This commit is contained in:
parent
1635ad0322
commit
15e15422ba
1 changed files with 1 additions and 3 deletions
|
|
@ -285,9 +285,7 @@ agx_open_device(void *memctx, struct agx_device *dev)
|
|||
|
||||
/* TODO: Support other models */
|
||||
CFDictionaryRef matching = IOServiceNameMatching("AGXAcceleratorG13G_B0");
|
||||
|
||||
io_service_t service =
|
||||
IOServiceGetMatchingService(kIOMasterPortDefault, matching);
|
||||
io_service_t service = IOServiceGetMatchingService(0, matching);
|
||||
|
||||
if (!service)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue