Commit d9cf15784f68935a25c5ece051ba595fccbc8f6c

Authored by blueswir1
1 parent fe25591e

Define a few structures instead of including a file, add "static"

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5225 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 20 additions and 2 deletions
usb-linux.c
... ... @@ -35,11 +35,29 @@
35 35 #include <sys/ioctl.h>
36 36 #include <signal.h>
37 37  
38   -#include <linux/usb/ch9.h>
39 38 #include <linux/usbdevice_fs.h>
40 39 #include <linux/version.h>
41 40 #include "hw/usb.h"
42 41  
  42 +/* We redefine it to avoid version problems */
  43 +struct usb_ctrltransfer {
  44 + uint8_t bRequestType;
  45 + uint8_t bRequest;
  46 + uint16_t wValue;
  47 + uint16_t wIndex;
  48 + uint16_t wLength;
  49 + uint32_t timeout;
  50 + void *data;
  51 +};
  52 +
  53 +struct usb_ctrlrequest {
  54 + uint8_t bRequestType;
  55 + uint8_t bRequest;
  56 + uint16_t wValue;
  57 + uint16_t wIndex;
  58 + uint16_t wLength;
  59 +};
  60 +
43 61 typedef int USBScanFunc(void *opaque, int bus_num, int addr, int class_id,
44 62 int vendor_id, int product_id,
45 63 const char *product_name, int speed);
... ... @@ -710,7 +728,7 @@ static int do_token_out(USBDevice *dev, USBPacket *p)
710 728 *
711 729 * Returns length of the transaction or one of the USB_RET_XXX codes.
712 730 */
713   -int usb_host_handle_packet(USBDevice *s, USBPacket *p)
  731 +static int usb_host_handle_packet(USBDevice *s, USBPacket *p)
714 732 {
715 733 switch(p->pid) {
716 734 case USB_MSG_ATTACH:
... ...