the unpatched c compiler is a bit too lax about embedding structs that have not been defined (as opposed to ptrs). this patch just defines DDesc before it is embedded in Desc. Reference: /n/sources/patch/applied/libusbuse Date: Tue Oct 20 21:37:45 CES 2009 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/usb/lib/usb.h Tue Oct 20 21:36:22 2009 +++ /sys/src/cmd/usb/lib/usb.h Tue Oct 20 21:36:21 2009 @@ -240,6 +240,14 @@ * within a configuration. * These are unknown to the library but handed to the driver. */ +struct DDesc +{ + uchar bLength; + uchar bDescriptorType; + uchar bbytes[1]; + /* extra bytes allocated here to keep the rest of it */ +}; + struct Desc { Conf* conf; /* where this descriptor was read */ @@ -247,14 +255,6 @@ Ep* ep; /* last endpt before desc in conf. */ Altc* altc; /* last alt.c. before desc in conf. */ DDesc data; /* unparsed standard USB descriptor */ -}; - -struct DDesc -{ - uchar bLength; - uchar bDescriptorType; - uchar bbytes[1]; - /* extra bytes allocated here to keep the rest of it */ }; /*