diff options
author | Josef Karthauser <joe@FreeBSD.org> | 2002-04-30 08:50:25 +0000 |
---|---|---|
committer | Josef Karthauser <joe@FreeBSD.org> | 2002-04-30 08:50:25 +0000 |
commit | afd972be29c135dedcb2d0f9225e344e6ac59f41 (patch) | |
tree | e329ddebcbcf4c08266c5c5b922c02c2e6ff7262 | |
parent | 33b28557ec4ab75f364ef77bdc5f09113e8dade8 (diff) | |
download | ports-afd972be29c135dedcb2d0f9225e344e6ac59f41.tar.gz ports-afd972be29c135dedcb2d0f9225e344e6ac59f41.zip |
Notes
-rw-r--r-- | net/pppoa/files/patch-ab | 76 |
1 files changed, 51 insertions, 25 deletions
diff --git a/net/pppoa/files/patch-ab b/net/pppoa/files/patch-ab index 9089f09cefc2..5fcc777670e4 100644 --- a/net/pppoa/files/patch-ab +++ b/net/pppoa/files/patch-ab @@ -1,87 +1,113 @@ --- src/pusb-bsd.c.orig Wed Nov 7 19:45:26 2001 -+++ src/pusb-bsd.c Thu Apr 25 21:15:55 2002 -@@ -100,7 +100,7 @@ ++++ src/pusb-bsd.c Tue Apr 30 09:50:20 2002 +@@ -100,7 +100,11 @@ { struct usb_device_info di; -- di.addr = device; ++#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001) + di.addr = device; ++#else + di.udi_addr = device; ++#endif if(ioctl(cfd, USB_DEVICEINFO, &di) < 0) continue; -@@ -116,15 +116,15 @@ +@@ -116,15 +120,25 @@ } #endif -- if(di.vendorNo == vendorID && di.productNo == productID) -+ if(di.udi_vendorNo == vendorID && di.udi_productNo == productID) ++#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001) + if(di.vendorNo == vendorID && di.productNo == productID) { -- if(strncmp(di.devnames[0], "ugen", 4) != 0) + if(strncmp(di.devnames[0], "ugen", 4) != 0) ++#else ++ if(di.udi_vendorNo == vendorID && di.udi_productNo == productID) ++ { + if(strncmp(di.udi_devnames[0], "ugen", 4) != 0) ++#endif { /* Has a real driver, don't mess with it */ continue; } -- sprintf(prefix, "/dev/%s", di.devnames[0]); ++#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001) + sprintf(prefix, "/dev/%s", di.devnames[0]); ++#else + sprintf(prefix, "/dev/%s", di.udi_devnames[0]); ++#endif #if defined(__FreeBSD__) sprintf(buf, "%s", prefix); #else -@@ -199,14 +199,14 @@ +@@ -199,6 +213,7 @@ { struct usb_ctl_request req; -- req.request.bmRequestType = request_type; -- req.request.bRequest = request; -- USETW(req.request.wValue, value); -- USETW(req.request.wIndex, index); -- USETW(req.request.wLength, size); ++#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001) + req.request.bmRequestType = request_type; + req.request.bRequest = request; + USETW(req.request.wValue, value); +@@ -206,7 +221,16 @@ + USETW(req.request.wLength, size); + + req.data = buf; +- req.flags = USBD_SHORT_XFER_OK; ++#else + req.ucr_request.bmRequestType = request_type; + 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 = buf; -- req.flags = USBD_SHORT_XFER_OK; ++ + req.ucr_data = buf; + req.ucr_flags = USBD_SHORT_XFER_OK; ++#endif /* !!! If your kernel is built with DIAGNOSTIC (which it is by !!! default under some versions of NetBSD) this ioctl will fail. -@@ -227,7 +227,7 @@ +@@ -227,7 +251,11 @@ if(ioctl(dev->fd, USB_DO_REQUEST, &req) < 0) return -1; else -- return req.actlen; ++#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001) + return req.actlen; ++#else + return req.ucr_actlen; ++#endif } int pusb_set_configuration(pusb_device_t dev, int config) -@@ -249,8 +249,8 @@ +@@ -249,8 +277,13 @@ struct usb_alt_interface intf; int config; -- intf.interface_index = interface; -- intf.alt_no = alternate; ++#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001) + intf.interface_index = interface; + intf.alt_no = alternate; ++#else + intf.uai_interface_index = interface; + intf.uai_alt_no = alternate; ++#endif if(ioctl(dev->fd, USB_SET_ALTINTERFACE, &intf) < 0) { -@@ -278,12 +278,12 @@ +@@ -278,12 +311,20 @@ { struct usb_alt_interface intf; -- intf.interface_index = interface; ++#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001) + intf.interface_index = interface; ++#else + intf.uai_interface_index = interface; ++#endif if(ioctl(dev->fd, USB_GET_ALTINTERFACE, &intf) < 0) return -1; -- return intf.alt_no; ++#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001) + return intf.alt_no; ++#else + return intf.uai_alt_no; ++#endif } pusb_endpoint_t pusb_endpoint_open(pusb_device_t dev, int epnum, int flags) |