diff options
author | Rene Ladan <rene@FreeBSD.org> | 2021-02-05 09:23:43 +0000 |
---|---|---|
committer | Rene Ladan <rene@FreeBSD.org> | 2021-02-05 09:23:43 +0000 |
commit | 291c34d237699571f1d1b13bd20b781bf6608d16 (patch) | |
tree | 377e07a7748589f74a28a386a845162911813b80 /comms | |
parent | 213acfdc02d45e9894e998c87b176d0369173df4 (diff) | |
download | freebsd-ports-291c34d237699571f1d1b13bd20b781bf6608d16.zip |
comms/usbmuxd: fix build on 11.4 after r563570
Reported by: swills
Diffstat (limited to 'comms')
-rw-r--r-- | comms/usbmuxd/files/patch-src_usb.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/comms/usbmuxd/files/patch-src_usb.c b/comms/usbmuxd/files/patch-src_usb.c new file mode 100644 index 000000000000..8a6240a3de35 --- /dev/null +++ b/comms/usbmuxd/files/patch-src_usb.c @@ -0,0 +1,17 @@ +libusb_has_capability() was implemented in r361977 and is only available on: +FreeBSD >= 1104501, 1201518, 1300098 +However, libusb in all supported versions of FreeBSD supports hotplug events. + +This patch can be safely removed after 11.4 and 12.1 EOL. + +--- src/usb.c.orig 2021-01-21 10:10:40 UTC ++++ src/usb.c +@@ -815,7 +815,7 @@ int usb_init(void) + collection_init(&device_list); + + #ifdef HAVE_LIBUSB_HOTPLUG_API +- if (libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) { ++ if (1) { + usbmuxd_log(LL_INFO, "Registering for libusb hotplug events"); + res = libusb_hotplug_register_callback(NULL, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED | LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT, LIBUSB_HOTPLUG_ENUMERATE, VID_APPLE, LIBUSB_HOTPLUG_MATCH_ANY, 0, usb_hotplug_cb, NULL, &usb_hotplug_cb_handle); + if (res == LIBUSB_SUCCESS) { |