libusb1: Update to 1.0.24
2020-12-09: v1.0.24 * Add new platform abstraction (#252) * Add Null POSIX backend * Add support for eventfd * Add support for thread IDs on Haiku, NetBSD and Solaris * New API libusb_hotplug_get_user_data() * Darwin (macOS): Fix race condition that results in segmentation fault (#701) * Darwin (macOS): Fix stale descriptor information post reset (#733) * Darwin (macOS): use IOUSBDevice as darwin_device_class explicitly (#693) * Linux: Drop support for kernel older than 2.6.32 * Linux: Provide an event thread name (#689) * Linux: Wait until all USBs have been reaped before freeing them (#607) * NetBSD: Recognize device timeouts (#710) * OpenBSD: Allow opening ugen devices multiple times (#763) * OpenBSD: Support libusb_get_port_number() (#764) * SunOS: Fix a memory leak (#756) * SunOS: Various fixes (#627, #628, #629) * Windows: Add Visual Studio 2019 support * Windows: Drop support for WinCE and Visual Studio older than 2013 * Windows: Drop support for Windows XP * Windows: Support building all examples using Visual Studio (#151) * Documentation fixes and improvements * Various other bug fixes and improvements
This commit is contained in:
parent
540b89b563
commit
2c8716f409
3 changed files with 7 additions and 122 deletions
|
@ -1,8 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.25 2020/04/03 20:39:03 nia Exp $
|
||||
# $NetBSD: Makefile,v 1.26 2020/12/18 23:06:19 nia Exp $
|
||||
|
||||
DISTNAME= libusb-1.0.23
|
||||
DISTNAME= libusb-1.0.24
|
||||
PKGNAME= ${DISTNAME:S/libusb/libusb1/}
|
||||
PKGREVISION= 1
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=libusb/}
|
||||
GITHUB_PROJECT= libusb
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
$NetBSD: distinfo,v 1.15 2020/04/03 20:39:03 nia Exp $
|
||||
$NetBSD: distinfo,v 1.16 2020/12/18 23:06:19 nia Exp $
|
||||
|
||||
SHA1 (libusb-1.0.23.tar.bz2) = 0140200398306b5e91c294d4a3c0f63aa0ef07b3
|
||||
RMD160 (libusb-1.0.23.tar.bz2) = b6ffe2441951d37d671bfbb1d84821269e8aef7c
|
||||
SHA512 (libusb-1.0.23.tar.bz2) = 73430ad31dd405e76a9c6c55086961003989c44964e2735b5076f9ca849e3f6fe71d10a66b74b111f0c34a0d2cb744b9ca105863c552123fce4ec0bbdd2ec15b
|
||||
Size (libusb-1.0.23.tar.bz2) = 602860 bytes
|
||||
SHA1 (patch-libusb_os_netbsd__usb.c) = 2cac7171e088f5d433c8a683b93168694c7fc8de
|
||||
SHA1 (libusb-1.0.24.tar.bz2) = d8d614b538f7c953b6e3b73f1eea5dc70820a7e2
|
||||
RMD160 (libusb-1.0.24.tar.bz2) = c673ae73d1c8d97632511973451eb647d0bf2d7f
|
||||
SHA512 (libusb-1.0.24.tar.bz2) = 5aea36a530aaa15c6dd656d0ed3ce204522c9946d8d39ffbb290dab4a98cda388a2598da4995123d1032324056090bd429e702459626d3e8d7daeebc4e7ff3dc
|
||||
Size (libusb-1.0.24.tar.bz2) = 606593 bytes
|
||||
|
|
|
@ -1,113 +0,0 @@
|
|||
$NetBSD: patch-libusb_os_netbsd__usb.c,v 1.4 2020/04/03 20:39:03 nia Exp $
|
||||
|
||||
* Set structure values by name
|
||||
* Do not emit log messages from netbsd_clock_gettime as it is called from
|
||||
the logger.
|
||||
* Translate EWOULDBLOCK (ugen timeouts) errors to LIBUSB_ERROR_TIMEOUT.
|
||||
|
||||
--- libusb/os/netbsd_usb.c.orig 2019-08-09 16:39:49.000000000 +0000
|
||||
+++ libusb/os/netbsd_usb.c
|
||||
@@ -87,55 +87,35 @@ static int _sync_gen_transfer(struct usb
|
||||
static int _access_endpoint(struct libusb_transfer *);
|
||||
|
||||
const struct usbi_os_backend usbi_backend = {
|
||||
- "Synchronous NetBSD backend",
|
||||
- 0,
|
||||
- NULL, /* init() */
|
||||
- NULL, /* exit() */
|
||||
- NULL, /* set_option() */
|
||||
- netbsd_get_device_list,
|
||||
- NULL, /* hotplug_poll */
|
||||
- netbsd_open,
|
||||
- netbsd_close,
|
||||
-
|
||||
- netbsd_get_device_descriptor,
|
||||
- netbsd_get_active_config_descriptor,
|
||||
- netbsd_get_config_descriptor,
|
||||
- NULL, /* get_config_descriptor_by_value() */
|
||||
-
|
||||
- netbsd_get_configuration,
|
||||
- netbsd_set_configuration,
|
||||
-
|
||||
- netbsd_claim_interface,
|
||||
- netbsd_release_interface,
|
||||
-
|
||||
- netbsd_set_interface_altsetting,
|
||||
- netbsd_clear_halt,
|
||||
- netbsd_reset_device,
|
||||
-
|
||||
- NULL, /* alloc_streams */
|
||||
- NULL, /* free_streams */
|
||||
-
|
||||
- NULL, /* dev_mem_alloc() */
|
||||
- NULL, /* dev_mem_free() */
|
||||
-
|
||||
- NULL, /* kernel_driver_active() */
|
||||
- NULL, /* detach_kernel_driver() */
|
||||
- NULL, /* attach_kernel_driver() */
|
||||
-
|
||||
- netbsd_destroy_device,
|
||||
-
|
||||
- netbsd_submit_transfer,
|
||||
- netbsd_cancel_transfer,
|
||||
- netbsd_clear_transfer_priv,
|
||||
-
|
||||
- NULL, /* handle_events() */
|
||||
- netbsd_handle_transfer_completion,
|
||||
-
|
||||
- netbsd_clock_gettime,
|
||||
- 0, /* context_priv_size */
|
||||
- sizeof(struct device_priv),
|
||||
- sizeof(struct handle_priv),
|
||||
- 0, /* transfer_priv_size */
|
||||
+ .name = "Synchronous NetBSD backend",
|
||||
+ .get_device_list = netbsd_get_device_list,
|
||||
+ .open = netbsd_open,
|
||||
+ .close = netbsd_close,
|
||||
+
|
||||
+ .get_device_descriptor = netbsd_get_device_descriptor,
|
||||
+ .get_active_config_descriptor = netbsd_get_active_config_descriptor,
|
||||
+ .get_config_descriptor = netbsd_get_config_descriptor,
|
||||
+
|
||||
+ .get_configuration = netbsd_get_configuration,
|
||||
+ .set_configuration = netbsd_set_configuration,
|
||||
+
|
||||
+ .claim_interface = netbsd_claim_interface,
|
||||
+ .release_interface = netbsd_release_interface,
|
||||
+
|
||||
+ .set_interface_altsetting = netbsd_set_interface_altsetting,
|
||||
+ .clear_halt = netbsd_clear_halt,
|
||||
+ .reset_device = netbsd_reset_device,
|
||||
+ .destroy_device = netbsd_destroy_device,
|
||||
+
|
||||
+ .submit_transfer = netbsd_submit_transfer,
|
||||
+ .cancel_transfer = netbsd_cancel_transfer,
|
||||
+ .clear_transfer_priv = netbsd_clear_transfer_priv,
|
||||
+
|
||||
+ .handle_transfer_completion = netbsd_handle_transfer_completion,
|
||||
+
|
||||
+ .clock_gettime = netbsd_clock_gettime,
|
||||
+ .device_priv_size = sizeof(struct device_priv),
|
||||
+ .device_handle_priv_size = sizeof(struct handle_priv),
|
||||
};
|
||||
|
||||
int
|
||||
@@ -498,8 +478,6 @@ netbsd_handle_transfer_completion(struct
|
||||
int
|
||||
netbsd_clock_gettime(int clkid, struct timespec *tp)
|
||||
{
|
||||
- usbi_dbg("clock %d", clkid);
|
||||
-
|
||||
if (clkid == USBI_CLOCK_REALTIME)
|
||||
return clock_gettime(CLOCK_REALTIME, tp);
|
||||
|
||||
@@ -521,6 +499,9 @@ _errno_to_libusb(int err)
|
||||
return (LIBUSB_ERROR_NO_DEVICE);
|
||||
case ENOMEM:
|
||||
return (LIBUSB_ERROR_NO_MEM);
|
||||
+ case EWOULDBLOCK:
|
||||
+ case ETIMEDOUT:
|
||||
+ return (LIBUSB_ERROR_TIMEOUT);
|
||||
}
|
||||
|
||||
usbi_dbg("error: %s", strerror(err));
|
Loading…
Reference in a new issue