From ae49507f60de52aea4673bac00f8f53dbc0425bc Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 20 Mar 2022 03:30:23 +0100 Subject: Use MACH_PORT_NULL to deal with kIOMasterPortDefault/kIOMainPortDefault rename In the end that's what the constant stands for anyway. --- src/libirecovery.c | 4 ++-- 1 file 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); -- cgit v1.1-32-gdbae