summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-03-20 03:30:23 +0100
committerGravatar Nikias Bassen2022-03-20 03:54:45 +0100
commitae49507f60de52aea4673bac00f8f53dbc0425bc (patch)
treec851d2f7b3313cfc951a9c6da70067bd3fb85243
parente19094594552b7bed60418ffe6f46f455e6bb78f (diff)
downloadlibirecovery-ae49507f60de52aea4673bac00f8f53dbc0425bc.tar.gz
libirecovery-ae49507f60de52aea4673bac00f8f53dbc0425bc.tar.bz2
Use MACH_PORT_NULL to deal with kIOMasterPortDefault/kIOMainPortDefault rename
In the end that's what the constant stands for anyway.
-rw-r--r--src/libirecovery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c
index d78abed..9197780 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -1302,7 +1302,7 @@ static io_iterator_t iokit_usb_get_iterator_for_pid(UInt16 pid) {
iokit_cfdictionary_set_short(matchingDict, CFSTR(kUSBVendorID), kAppleVendorID);
iokit_cfdictionary_set_short(matchingDict, CFSTR(kUSBProductID), pid);
- result = IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, &iterator);
+ result = IOServiceGetMatchingServices(MACH_PORT_NULL, matchingDict, &iterator);
if (result != kIOReturnSuccess)
return IO_OBJECT_NULL;
@@ -2272,7 +2272,7 @@ static void *_irecv_event_handler(void* data)
#ifdef HAVE_IOKIT
kern_return_t kr;
- IONotificationPortRef notifyPort = IONotificationPortCreate(kIOMasterPortDefault);
+ IONotificationPortRef notifyPort = IONotificationPortCreate(MACH_PORT_NULL);
CFRunLoopSourceRef runLoopSource = IONotificationPortGetRunLoopSource(notifyPort);
iokit_runloop = CFRunLoopGetCurrent();
CFRunLoopAddSource(iokit_runloop, runLoopSource, kCFRunLoopDefaultMode);