Index: Makefile =================================================================== RCS file: /cvs/ports/devel/libusb/Makefile,v retrieving revision 1.18 diff -N -u -p Makefile --- Makefile 26 Nov 2010 13:30:19 -0000 1.18 +++ Makefile 3 Jan 2011 15:24:56 -0000 @@ -3,7 +3,7 @@ COMMENT= USB access library DISTNAME= libusb-0.1.12 -REVISION= 0 +REVISION= 1 SHARED_LIBS= usb 9.0 \ usbpp 10.0 MODGNU_SHARED_LIBS= usb '-export-dynamic' \ Index: patches/patch-bsd_c =================================================================== RCS file: /cvs/ports/devel/libusb/patches/patch-bsd_c,v retrieving revision 1.8 diff -N -u -p patches/patch-bsd_c --- patches/patch-bsd_c 26 Nov 2010 13:30:19 -0000 1.8 +++ patches/patch-bsd_c 3 Jan 2011 15:24:56 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-bsd_c,v 1.8 2010/11/26 13:30:19 ajacoutot Exp $ ---- bsd.c.orig Sat Mar 4 03:52:46 2006 -+++ bsd.c Thu Nov 25 18:54:05 2010 +--- bsd.c.orig Fri Mar 3 18:52:46 2006 ++++ bsd.c Sun Jan 2 16:21:30 2011 @@ -361,7 +361,7 @@ int usb_bulk_read(usb_dev_handle *dev, int ep, char *b int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, int size, int timeout) @@ -76,7 +76,51 @@ $OpenBSD: patch-bsd_c,v 1.8 2010/11/26 13:30:19 ajacou } int usb_os_find_busses(struct usb_bus **busses) -@@ -623,9 +615,21 @@ int usb_resetep(usb_dev_handle *dev, unsigned int ep) +@@ -525,7 +517,8 @@ int usb_os_find_devices(struct usb_bus *bus, struct us + { + struct usb_device *fdev = NULL; + int cfd, dfd; +- int device; ++ int device, i; ++ char devname[USB_MAX_DEVNAMELEN]; + + cfd = open(bus->dirname, O_RDONLY); + if (cfd < 0) +@@ -543,15 +536,20 @@ int usb_os_find_devices(struct usb_bus *bus, struct us + continue; + + /* There's a device; is it one we should mess with? */ +- +- if (strncmp(di.udi_devnames[0], "ugen", 4) != 0) +- /* best not to play with things we don't understand */ ++ devname[0] = '\0'; ++ for (i = 0; i < USB_MAX_DEVNAMES; i++) { ++ if (strncmp(di.udi_devnames[i], "ugen", 4) == 0) { ++ snprintf(devname, sizeof(devname), di.udi_devnames[i]); ++ break; ++ } ++ } ++ if (devname[0] == '\0') + continue; + + #ifdef __FreeBSD_kernel__ + snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.udi_devnames[0]); + #else +- snprintf(buf, sizeof(buf) - 1, "/dev/%s.00", di.udi_devnames[0]); ++ snprintf(buf, sizeof(buf) - 1, "/dev/%s.00", devname); + #endif + + /* Open its control endpoint */ +@@ -575,7 +573,7 @@ int usb_os_find_devices(struct usb_bus *bus, struct us + * This seemed easier than having 2 variables... + */ + #if (__NetBSD__ || __OpenBSD__) +- snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.udi_devnames[0]); ++ snprintf(buf, sizeof(buf) - 1, "/dev/%s", devname); + #endif + + strncpy(dev->filename, buf, sizeof(dev->filename) - 1); +@@ -623,9 +621,21 @@ int usb_resetep(usb_dev_handle *dev, unsigned int ep) int usb_clear_halt(usb_dev_handle *dev, unsigned int ep) {