svn commit: r564094 - head/comms/usbmuxd/files

Rene Ladan rene at FreeBSD.org
Fri Feb 5 09:23:44 UTC 2021


Author: rene
Date: Fri Feb  5 09:23:43 2021
New Revision: 564094
URL: https://svnweb.freebsd.org/changeset/ports/564094

Log:
  comms/usbmuxd: fix build on 11.4 after r563570
  
  Reported by:	swills

Added:
  head/comms/usbmuxd/files/patch-src_usb.c
     - copied unchanged from r563569, head/comms/usbmuxd/files/patch-src_usb.c

Copied: head/comms/usbmuxd/files/patch-src_usb.c (from r563569, head/comms/usbmuxd/files/patch-src_usb.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/usbmuxd/files/patch-src_usb.c	Fri Feb  5 09:23:43 2021	(r564094, copy of r563569, head/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) {


More information about the svn-ports-all mailing list