Skip to content

Commit 7ffc3dc

Browse files
authored
Merge pull request #8 from Zondax/fix_mac_build
replace default with NULL
2 parents 5552068 + d021f1e commit 7ffc3dc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

hidapi/mac/hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path)
690690
return NULL;
691691

692692
/* Get the IORegistry entry for the given path */
693-
entry = IORegistryEntryFromPath(kIOMainPortDefault, path);
693+
entry = IORegistryEntryFromPath(MACH_PORT_NULL, path);
694694
if (entry == MACH_PORT_NULL) {
695695
/* Path wasn't valid (maybe device was removed?) */
696696
goto return_error;

libusb/libusb/os/darwin_usb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static int usb_setup_device_iterator (io_iterator_t *deviceIterator, UInt32 loca
235235
/* else we can still proceed as long as the caller accounts for the possibility of other devices in the iterator */
236236
}
237237

238-
return IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, deviceIterator);
238+
return IOServiceGetMatchingServices(MACH_PORT_NULL, matchingDict, deviceIterator);
239239
}
240240

241241
/* Returns 1 on success, 0 on failure. */
@@ -370,7 +370,7 @@ static void darwin_hotplug_poll (void)
370370
/* since a kernel thread may nodify the IOInterators used for
371371
* hotplug notidication we can't just clear the iterators.
372372
* instead just wait until all IOService providers are quiet */
373-
(void) IOKitWaitQuiet (kIOMasterPortDefault, &timeout);
373+
(void) IOKitWaitQuiet (MACH_PORT_NULL, &timeout);
374374
}
375375

376376
static void darwin_clear_iterator (io_iterator_t iter) {
@@ -421,7 +421,7 @@ static void *darwin_event_thread_main (void *arg0) {
421421
CFRunLoopAddSource(runloop, libusb_darwin_acfls, kCFRunLoopDefaultMode);
422422

423423
/* add the notification port to the run loop */
424-
libusb_notification_port = IONotificationPortCreate (kIOMasterPortDefault);
424+
libusb_notification_port = IONotificationPortCreate (MACH_PORT_NULL);
425425
libusb_notification_cfsource = IONotificationPortGetRunLoopSource (libusb_notification_port);
426426
CFRunLoopAddSource(runloop, libusb_notification_cfsource, kCFRunLoopDefaultMode);
427427

@@ -695,7 +695,7 @@ static int darwin_check_configuration (struct libusb_context *ctx, struct darwin
695695
} else
696696
/* not configured */
697697
dev->active_config = 0;
698-
698+
699699
usbi_dbg ("active config: %u, first config: %u", dev->active_config, dev->first_config);
700700

701701
return 0;

0 commit comments

Comments
 (0)