From owner-svn-ports-all@freebsd.org Fri Feb 5 09:23:44 2021 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21E9654225F; Fri, 5 Feb 2021 09:23:44 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DX92l6Zk5z4kLH; Fri, 5 Feb 2021 09:23:43 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4DB01C512; Fri, 5 Feb 2021 09:23:43 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 1159Nhn1014615; Fri, 5 Feb 2021 09:23:43 GMT (envelope-from rene@FreeBSD.org) Received: (from rene@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 1159Nh9c014614; Fri, 5 Feb 2021 09:23:43 GMT (envelope-from rene@FreeBSD.org) Message-Id: <202102050923.1159Nh9c014614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rene set sender to rene@FreeBSD.org using -f From: Rene Ladan Date: Fri, 5 Feb 2021 09:23:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r564094 - head/comms/usbmuxd/files X-SVN-Group: ports-head X-SVN-Commit-Author: rene X-SVN-Commit-Paths: head/comms/usbmuxd/files X-SVN-Commit-Revision: 564094 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2021 09:23:44 -0000 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) {