pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libusb1 Translate EWOULDBLOCK to LIBUSB_ERROR_TI...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dc7b4751275c
branches:  trunk
changeset: 406467:dc7b4751275c
user:      jmcneill <jmcneill%pkgsrc.org@localhost>
date:      Sun Dec 22 17:06:39 2019 +0000

description:
Translate EWOULDBLOCK to LIBUSB_ERROR_TIMEOUT on NetBSD.

diffstat:

 devel/libusb1/Makefile                              |   4 ++--
 devel/libusb1/distinfo                              |   4 ++--
 devel/libusb1/patches/patch-libusb_os_netbsd__usb.c |  16 +++++++++++++---
 3 files changed, 17 insertions(+), 7 deletions(-)

diffs (59 lines):

diff -r e99170d87725 -r dc7b4751275c devel/libusb1/Makefile
--- a/devel/libusb1/Makefile    Sun Dec 22 16:49:05 2019 +0000
+++ b/devel/libusb1/Makefile    Sun Dec 22 17:06:39 2019 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.21 2019/12/22 16:49:05 jmcneill Exp $
+# $NetBSD: Makefile,v 1.22 2019/12/22 17:06:39 jmcneill Exp $
 
 DISTNAME=      libusb-1.0.22
 PKGNAME=       ${DISTNAME:S/libusb/libusb1/}
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=libusb/}
 EXTRACT_SUFX=  .tar.bz2
diff -r e99170d87725 -r dc7b4751275c devel/libusb1/distinfo
--- a/devel/libusb1/distinfo    Sun Dec 22 16:49:05 2019 +0000
+++ b/devel/libusb1/distinfo    Sun Dec 22 17:06:39 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2019/12/22 16:49:05 jmcneill Exp $
+$NetBSD: distinfo,v 1.13 2019/12/22 17:06:39 jmcneill Exp $
 
 SHA1 (libusb-1.0.22.tar.bz2) = 10116aa265aac4273a0c894faa089370262ec0dc
 RMD160 (libusb-1.0.22.tar.bz2) = 59b800abb0b4c088dbee950fa67bb31240b8a134
@@ -6,6 +6,6 @@
 Size (libusb-1.0.22.tar.bz2) = 598833 bytes
 SHA1 (patch-configure) = 2776ff354ea8f17663a9a5330f6fe990af27d8fe
 SHA1 (patch-configure.ac) = 9344b3d6439348164410d1b2071cf14c3f388354
-SHA1 (patch-libusb_os_netbsd__usb.c) = af3202b93596710a94345ccdfe6466d833f34028
+SHA1 (patch-libusb_os_netbsd__usb.c) = 3ea7568379683c9a8660b308d2c52b4a48b3c8e6
 SHA1 (patch-libusb_os_sunos__usb.c) = 4896e497d451487a09b3be9ad74f72595a441086
 SHA1 (patch-ub) = 14bffca93ec8445cbfccb613dfda92f652b0ceb0
diff -r e99170d87725 -r dc7b4751275c devel/libusb1/patches/patch-libusb_os_netbsd__usb.c
--- a/devel/libusb1/patches/patch-libusb_os_netbsd__usb.c       Sun Dec 22 16:49:05 2019 +0000
+++ b/devel/libusb1/patches/patch-libusb_os_netbsd__usb.c       Sun Dec 22 17:06:39 2019 +0000
@@ -1,7 +1,8 @@
-$NetBSD: patch-libusb_os_netbsd__usb.c,v 1.1 2019/12/22 16:49:05 jmcneill Exp $
+$NetBSD: patch-libusb_os_netbsd__usb.c,v 1.2 2019/12/22 17:06:39 jmcneill Exp $
 
-Do not emit log messages from netbsd_clock_gettime as it is called from
-the logger.
+* 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        2018-03-17 07:23:37.000000000 +0000
 +++ libusb/os/netbsd_usb.c
@@ -14,3 +15,12 @@
        if (clkid == USBI_CLOCK_REALTIME)
                return clock_gettime(CLOCK_REALTIME, tp);
  
+@@ -516,6 +514,8 @@ _errno_to_libusb(int err)
+               return (LIBUSB_ERROR_NO_DEVICE);
+       case ENOMEM:
+               return (LIBUSB_ERROR_NO_MEM);
++      case EWOULDBLOCK:
++              return (LIBUSB_ERROR_TIMEOUT);
+       }
+ 
+       usbi_dbg("error: %s", strerror(err));



Home | Main Index | Thread Index | Old Index