libusb: update to 1.0.25.

This commit is contained in:
skmpz 2022-02-05 10:01:27 +04:00 committed by Echo
parent 1bf20e9d90
commit aaa8fb5a9a
3 changed files with 5 additions and 55 deletions

View file

@ -1,35 +0,0 @@
--- a/libusb/os/linux_usbfs.c
+++ b/libusb/os/linux_usbfs.c
@@ -641,7 +641,12 @@ static int seek_to_next_config(struct libusb_context *ctx,
uint8_t *buffer, size_t len)
{
struct usbi_descriptor_header *header;
- int offset = 0;
+ int offset;
+
+ /* Start seeking past the config descriptor */
+ offset = LIBUSB_DT_CONFIG_SIZE;
+ buffer += LIBUSB_DT_CONFIG_SIZE;
+ len -= LIBUSB_DT_CONFIG_SIZE;
while (len > 0) {
if (len < 2) {
@@ -718,7 +723,7 @@ static int parse_config_descriptors(struct libusb_device *dev)
}
if (priv->sysfs_dir) {
- /*
+ /*
* In sysfs wTotalLength is ignored, instead the kernel returns a
* config descriptor with verified bLength fields, with descriptors
* with an invalid bLength removed.
@@ -727,8 +732,7 @@ static int parse_config_descriptors(struct libusb_device *dev)
int offset;
if (num_configs > 1 && idx < num_configs - 1) {
- offset = seek_to_next_config(ctx, buffer + LIBUSB_DT_CONFIG_SIZE,
- remaining - LIBUSB_DT_CONFIG_SIZE);
+ offset = seek_to_next_config(ctx, buffer, remaining);
if (offset < 0)
return offset;
sysfs_config_len = (uint16_t)offset;

View file

@ -1,16 +0,0 @@
--- a/libusb/io.c 2014-01-11 16:34:55.811463881 +0100
+++ b/libusb/io.c 2014-01-11 16:35:26.138281377 +0100
@@ -34,6 +34,13 @@
#include <sys/timerfd.h>
#endif
+#ifndef TIMESPEC_TO_TIMEVAL
+#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
+ (tv)->tv_sec = (ts)->tv_sec; \
+ (tv)->tv_usec = (ts)->tv_nsec / 1000; \
+}
+#endif
+
#include "libusbi.h"
/**

View file

@ -1,16 +1,17 @@
# Template file for 'libusb'
pkgname=libusb
version=1.0.24
revision=2
version=1.0.25
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="eudev-libudev-devel"
short_desc="Library which allows userspace access to USB devices"
maintainer="Orphaned <orphan@voidlinux.org>"
maintainer="skmpz <dem.procopiou@gmail.com>"
license="LGPL-2.1-or-later"
homepage="https://libusb.info"
changelog="https://raw.githubusercontent.com/libusb/libusb/master/ChangeLog"
distfiles="https://github.com/libusb/libusb/releases/download/v${version}/libusb-${version}.tar.bz2"
checksum=7efd2685f7b327326dcfb85cee426d9b871fd70e22caa15bb68d595ce2a2b12a
checksum=8a28ef197a797ebac2702f095e81975e2b02b2eeff2774fa909c78a74ef50849
libusb-devel_package() {
short_desc+=" - development files"