Skip to content

Commit

Permalink
Merge pull request #8 from Zondax/fix_mac_build
Browse files Browse the repository at this point in the history
replace default with NULL
  • Loading branch information
ftheirs committed Nov 15, 2022
2 parents 5552068 + d021f1e commit 7ffc3dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hidapi/mac/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path)
return NULL;

/* Get the IORegistry entry for the given path */
entry = IORegistryEntryFromPath(kIOMainPortDefault, path);
entry = IORegistryEntryFromPath(MACH_PORT_NULL, path);
if (entry == MACH_PORT_NULL) {
/* Path wasn't valid (maybe device was removed?) */
goto return_error;
Expand Down
8 changes: 4 additions & 4 deletions libusb/libusb/os/darwin_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static int usb_setup_device_iterator (io_iterator_t *deviceIterator, UInt32 loca
/* else we can still proceed as long as the caller accounts for the possibility of other devices in the iterator */
}

return IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, deviceIterator);
return IOServiceGetMatchingServices(MACH_PORT_NULL, matchingDict, deviceIterator);
}

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

static void darwin_clear_iterator (io_iterator_t iter) {
Expand Down Expand Up @@ -421,7 +421,7 @@ static void *darwin_event_thread_main (void *arg0) {
CFRunLoopAddSource(runloop, libusb_darwin_acfls, kCFRunLoopDefaultMode);

/* add the notification port to the run loop */
libusb_notification_port = IONotificationPortCreate (kIOMasterPortDefault);
libusb_notification_port = IONotificationPortCreate (MACH_PORT_NULL);
libusb_notification_cfsource = IONotificationPortGetRunLoopSource (libusb_notification_port);
CFRunLoopAddSource(runloop, libusb_notification_cfsource, kCFRunLoopDefaultMode);

Expand Down Expand Up @@ -695,7 +695,7 @@ static int darwin_check_configuration (struct libusb_context *ctx, struct darwin
} else
/* not configured */
dev->active_config = 0;

usbi_dbg ("active config: %u, first config: %u", dev->active_config, dev->first_config);

return 0;
Expand Down

0 comments on commit 7ffc3dc

Please sign in to comment.