Fix broken compile after the usb 'typedef struct' commit.

Reported and ok naddy@
This commit is contained in:
mglocker 2013-04-17 04:42:32 +00:00
parent f2e0646a0d
commit 8f5c76d917

View File

@ -1,6 +1,5 @@
$OpenBSD: patch-usbctl_c,v 1.3 2009/01/14 00:58:39 sthen Exp $
--- usbctl.c.orig Mon Feb 25 00:50:55 2002
+++ usbctl.c Mon Dec 15 17:43:07 2008
--- usbctl.c.orig Mon Feb 25 01:50:55 2002
+++ usbctl.c Tue Apr 16 22:42:31 2013
@@ -62,6 +62,7 @@
#endif
@ -54,6 +53,15 @@ $OpenBSD: patch-usbctl_c,v 1.3 2009/01/14 00:58:39 sthen Exp $
#ifdef NSTRINGS
USETW(req.ucr_request.wLength, sizeof(usb_string_descriptor_t));
req.ucr_flags = USBD_SHORT_XFER_OK;
@@ -309,7 +336,7 @@ bPwrOn2PwrGood=%d bHubContrCurrent=%d DeviceRemovable=
}
void
-prhidd(usb_hid_descriptor_t *d)
+prhidd(struct usb_hid_descriptor *d)
{
int i;
@@ -384,7 +411,7 @@ struct usb_cdc_union_descriptor {
};
@ -72,6 +80,24 @@ $OpenBSD: patch-usbctl_c,v 1.3 2009/01/14 00:58:39 sthen Exp $
USETW(req.ucr_request.wIndex, 0);
USETW(req.ucr_request.wLength, USB_HUB_DESCRIPTOR_SIZE);
req.ucr_data = d;
@@ -689,7 +716,7 @@ getconfigdesc(int f, int i, usb_config_descriptor_t *d
}
void
-gethiddesc(int f, int i, usb_hid_descriptor_t *d, int size, int addr)
+gethiddesc(int f, int i, struct usb_hid_descriptor *d, int size, int addr)
{
struct usb_ctl_request req;
int r;
@@ -1147,7 +1174,7 @@ prdesc(void *p, int *class, int *subclass, int *iface,
#endif
case UDESC_CS_DEVICE:
if (*class == UICLASS_HID) {
- usb_hid_descriptor_t *hid = p;
+ struct usb_hid_descriptor *hid = p;
int k;
printf("HID descriptor:\n");
@@ -1243,8 +1270,8 @@ prdesc(void *p, int *class, int *subclass, int *iface,
default:
def: