Skip to content

Commit 5b6cc64

Browse files
committed
Fix Apple depreciation of kIOMasterPortDefault
1 parent 9b97ca6 commit 5b6cc64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/mac/iokit_mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ libusbp_error * service_get_from_id(uint64_t id, io_service_t * service)
1919
return error_create("Failed to create a dictionary matching the ID.");
2020
}
2121

22-
*service = IOServiceGetMatchingService(kIOMasterPortDefault, dict);
22+
*service = IOServiceGetMatchingService(kIOMainPortDefault, dict);
2323
if (*service == MACH_PORT_NULL)
2424
{
2525
return error_create("Failed to find service with ID 0x%" PRIx64 ".", id);

src/mac/list_mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ libusbp_error * libusbp_list_connected_devices(
5353
// IOServiceGetMatchingServices consumes one reference to dict,
5454
// so we don't have to CFRelease it.
5555
kern_return_t result = IOServiceGetMatchingServices(
56-
kIOMasterPortDefault, dict, &iterator);
56+
kIOMainPortDefault, dict, &iterator);
5757
dict = NULL;
5858
if (result != KERN_SUCCESS)
5959
{

0 commit comments

Comments
 (0)