diff options
author | mycroft <mycroft@pkgsrc.org> | 2002-08-19 19:07:19 +0000 |
---|---|---|
committer | mycroft <mycroft@pkgsrc.org> | 2002-08-19 19:07:19 +0000 |
commit | cddd6cc3cdcc4c94f5f6138678639ba01cfdd690 (patch) | |
tree | 985cd935925e47c10bd795cb7e000aac9d4cdfc1 /devel/libusb/patches | |
parent | 489a8cec3f5cdd5fc0b2aceac169f92a4e9021d5 (diff) | |
download | pkgsrc-cddd6cc3cdcc4c94f5f6138678639ba01cfdd690.tar.gz |
Update to 0.1.6a. There is no documentation included on the changes, but a
cursory inspection suggests that they are mostly build related, and some minor
bug fixes to the platform-dependent code.
Diffstat (limited to 'devel/libusb/patches')
-rw-r--r-- | devel/libusb/patches/patch-ac | 10 | ||||
-rw-r--r-- | devel/libusb/patches/patch-ad | 109 |
2 files changed, 5 insertions, 114 deletions
diff --git a/devel/libusb/patches/patch-ac b/devel/libusb/patches/patch-ac index 971a36d9e12..77c9f483124 100644 --- a/devel/libusb/patches/patch-ac +++ b/devel/libusb/patches/patch-ac @@ -1,11 +1,11 @@ -$NetBSD: patch-ac,v 1.1.1.1 2001/03/28 10:11:41 drochner Exp $ +$NetBSD: patch-ac,v 1.2 2002/08/19 19:07:21 mycroft Exp $ ---- libusb-config.in.orig Fri Feb 16 18:10:59 2001 -+++ libusb-config.in Fri Feb 16 18:12:52 2001 +--- libusb-config.in.orig Mon May 13 22:29:07 2002 ++++ libusb-config.in Thu Jul 11 01:57:07 2002 @@ -75,5 +75,5 @@ echo $includes fi if test "$echo_libs" = "yes"; then -- echo -L@libdir@ -lusb -+ echo -L@libdir@ -Wl,-R@libdir@ -lusb +- echo -L@libdir@ -lusb @OSLIBS@ ++ echo -L@libdir@ -Wl,-R@libdir@ -lusb @OSLIBS@ fi diff --git a/devel/libusb/patches/patch-ad b/devel/libusb/patches/patch-ad deleted file mode 100644 index d0c08cf2d3f..00000000000 --- a/devel/libusb/patches/patch-ad +++ /dev/null @@ -1,109 +0,0 @@ -$NetBSD: patch-ad,v 1.2 2002/03/03 15:22:28 veego Exp $ - ---- bsd.c.orig Thu Feb 7 07:43:25 2002 -+++ bsd.c Sun Mar 3 14:59:58 2002 -@@ -37,6 +37,16 @@ - - #include <dev/usb/usb.h> - -+#ifndef USB_STACK_VERSION -+#define uai_interface_index interface_index -+#define uai_alt_no alt_no -+#define ucr_request request -+#define ucr_data data -+#define ucr_flags flags -+#define udi_addr addr -+#define udi_devnames devnames -+#endif -+ - #include "usbi.h" - #ifdef HAVE_CONFIG_H - #include "config.h" -@@ -151,8 +161,8 @@ - if (dev->interface < 0) - USB_ERROR(-EINVAL); - -- intf.interface_index = dev->interface; -- intf.alt_no = alternate; -+ intf.uai_interface_index = dev->interface; -+ intf.uai_alt_no = alternate; - - ret = ioctl(dev->fd, USB_SET_ALTINTERFACE, &intf); - if (ret < 0) -@@ -182,6 +192,11 @@ - #else - snprintf(buf, sizeof(buf) - 1, "%s.%02d", dev->device->filename, ep); - #endif -+ /* Try to open it O_RDWR first for those devices which have in and out -+ * endpoints with the same address (eg 0x02 and 0x82) -+ */ -+ fd = open(buf, O_RDWR); -+ if (fd < 0 && errno == ENXIO) - fd = open(buf, mode); - if (fd < 0) - USB_ERROR_STR(fd, "can't open %s for bulk read: %s\n", -@@ -284,14 +299,14 @@ - fprintf(stderr, "usb_control_msg: %d %d %d %d %p %d %d\n", - requesttype, request, value, index, bytes, size, timeout); - -- req.request.bmRequestType = requesttype; -- req.request.bRequest = request; -- USETW(req.request.wValue, value); -- USETW(req.request.wIndex, index); -- USETW(req.request.wLength, size); -+ req.ucr_request.bmRequestType = requesttype; -+ req.ucr_request.bRequest = request; -+ USETW(req.ucr_request.wValue, value); -+ USETW(req.ucr_request.wIndex, index); -+ USETW(req.ucr_request.wLength, size); - -- req.data = bytes; -- req.flags = 0; -+ req.ucr_data = bytes; -+ req.ucr_flags = 0; - - ret = ioctl(dev->fd, USB_SET_TIMEOUT, &timeout); - if (ret < 0) -@@ -303,7 +318,7 @@ - USB_ERROR_STR(ret, "error sending control message: %s", - strerror(errno)); - -- return UGETW(req.request.wLength); -+ return UGETW(req.ucr_request.wLength); - } - - int usb_find_devices_on_bus(struct usb_bus *bus) -@@ -321,20 +336,20 @@ - struct usb_device *dev; - char buf[20]; - -- di.addr = device; -+ di.udi_addr = device; - if (ioctl(cfd, USB_DEVICEINFO, &di) < 0) - continue; - - /* There's a device; is it one we should mess with? */ - -- if (strncmp(di.devnames[0], "ugen", 4) != 0) -+ if (strncmp(di.udi_devnames[0], "ugen", 4) != 0) - /* best not to play with things we don't understand */ - continue; - - #if __FreeBSD__ -- snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.devnames[0]); -+ snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.udi_devnames[0]); - #else -- snprintf(buf, sizeof(buf) - 1, "/dev/%s.00", di.devnames[0]); -+ snprintf(buf, sizeof(buf) - 1, "/dev/%s.00", di.udi_devnames[0]); - #endif - - /* Don't re-add it if we were called multiple times */ -@@ -364,7 +379,7 @@ - * This seemed easier than having 2 variables... - */ - #if __NetBSD__ -- snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.devnames[0]); -+ snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.udi_devnames[0]); - #endif - - strncpy(dev->filename, buf, sizeof(dev->filename) - 1); |