diff options
author | joe <joe@FreeBSD.org> | 2002-03-11 08:29:13 +0800 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-03-11 08:29:13 +0800 |
commit | dcf7b35261c7a3c2cd0103ddaca126c74b3710b7 (patch) | |
tree | dd46260c7f341dad87b5282869cb7c955a303d89 /devel | |
parent | ef3eb7d110123b84061b6c2e7db8123f2f9e3c48 (diff) | |
download | freebsd-ports-gnome-dcf7b35261c7a3c2cd0103ddaca126c74b3710b7.tar.gz freebsd-ports-gnome-dcf7b35261c7a3c2cd0103ddaca126c74b3710b7.tar.zst freebsd-ports-gnome-dcf7b35261c7a3c2cd0103ddaca126c74b3710b7.zip |
Some structures in usb.h have changed recently.
Submitted by: John Reynolds <jreynold@sedona.ch.intel.com>
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libusb/files/patch-bsd.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/devel/libusb/files/patch-bsd.c b/devel/libusb/files/patch-bsd.c new file mode 100644 index 000000000000..da4a5024a56f --- /dev/null +++ b/devel/libusb/files/patch-bsd.c @@ -0,0 +1,66 @@ +--- bsd.orig Sun Mar 3 09:58:41 2002 ++++ bsd.c Sun Mar 3 10:03:56 2002 +@@ -151,8 +151,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) +@@ -284,14 +284,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 +303,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,18 +321,18 @@ + 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]); + #endif |