diff options
| author | 2022-03-20 03:30:23 +0100 | |
|---|---|---|
| committer | 2022-03-20 03:54:45 +0100 | |
| commit | ae49507f60de52aea4673bac00f8f53dbc0425bc (patch) | |
| tree | c851d2f7b3313cfc951a9c6da70067bd3fb85243 | |
| parent | e19094594552b7bed60418ffe6f46f455e6bb78f (diff) | |
| download | libirecovery-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.c | 4 |
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) { | |||
| 1302 | iokit_cfdictionary_set_short(matchingDict, CFSTR(kUSBVendorID), kAppleVendorID); | 1302 | iokit_cfdictionary_set_short(matchingDict, CFSTR(kUSBVendorID), kAppleVendorID); |
| 1303 | iokit_cfdictionary_set_short(matchingDict, CFSTR(kUSBProductID), pid); | 1303 | iokit_cfdictionary_set_short(matchingDict, CFSTR(kUSBProductID), pid); |
| 1304 | 1304 | ||
| 1305 | result = IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, &iterator); | 1305 | result = IOServiceGetMatchingServices(MACH_PORT_NULL, matchingDict, &iterator); |
| 1306 | if (result != kIOReturnSuccess) | 1306 | if (result != kIOReturnSuccess) |
| 1307 | return IO_OBJECT_NULL; | 1307 | return IO_OBJECT_NULL; |
| 1308 | 1308 | ||
| @@ -2272,7 +2272,7 @@ static void *_irecv_event_handler(void* data) | |||
| 2272 | #ifdef HAVE_IOKIT | 2272 | #ifdef HAVE_IOKIT |
| 2273 | kern_return_t kr; | 2273 | kern_return_t kr; |
| 2274 | 2274 | ||
| 2275 | IONotificationPortRef notifyPort = IONotificationPortCreate(kIOMasterPortDefault); | 2275 | IONotificationPortRef notifyPort = IONotificationPortCreate(MACH_PORT_NULL); |
| 2276 | CFRunLoopSourceRef runLoopSource = IONotificationPortGetRunLoopSource(notifyPort); | 2276 | CFRunLoopSourceRef runLoopSource = IONotificationPortGetRunLoopSource(notifyPort); |
| 2277 | iokit_runloop = CFRunLoopGetCurrent(); | 2277 | iokit_runloop = CFRunLoopGetCurrent(); |
| 2278 | CFRunLoopAddSource(iokit_runloop, runLoopSource, kCFRunLoopDefaultMode); | 2278 | CFRunLoopAddSource(iokit_runloop, runLoopSource, kCFRunLoopDefaultMode); |
