Skip to contentSkip to conversation

PATCH: fix usb-linux.c compile orror

Qemu-devel Robert Reif 3 participants 7 messages Sep 28, 2008 – Sep 30, 2008

lore
Share & tools
lore
#0 lore raw

This patch fixes the following compile error:

usb-linux.c: In function `usb_linux_update_endp_table':
usb-linux.c:777: error: structure has no member named bRequestType' usb-linux.c:778: error: structure has no member named bRequest' usb-linux.c:779: error: structure has no member named wValue' usb-linux.c:780: error: structure has no member named wIndex' usb-linux.c:781: error: structure has no member named wLength' usb-linux.c:818: error: structure has no member named bRequestType' usb-linux.c:819: error: structure has no member named bRequest' usb-linux.c:820: error: structure has no member named wValue' usb-linux.c:821: error: structure has no member named wIndex' usb-linux.c:822: error: structure has no member named wLength'
make: *** [usb-linux.o] Error 1

usb-linux.c +1 -1
@@ -771,7 +771,7 @@
 {
     uint8_t *descriptors;
     uint8_t devep, type, configuration, alt_interface;
-    struct usbdevfs_ctrltransfer ct;
+    struct usb_ctrltransfer ct;
     int interface, ret, length, i;
 
     ct.bRequestType = USB_DIR_IN;
#1 lore raw
Quoted 14 lines · Robert Reif

This patch fixes the following compile error:

usb-linux.c: In function `usb_linux_update_endp_table':
usb-linux.c:777: error: structure has no member named bRequestType' usb-linux.c:778: error: structure has no member named bRequest' usb-linux.c:779: error: structure has no member named wValue' usb-linux.c:780: error: structure has no member named wIndex' usb-linux.c:781: error: structure has no member named wLength' usb-linux.c:818: error: structure has no member named bRequestType' usb-linux.c:819: error: structure has no member named bRequest' usb-linux.c:820: error: structure has no member named wValue' usb-linux.c:821: error: structure has no member named wIndex' usb-linux.c:822: error: structure has no member named wLength'
make: *** [usb-linux.o] Error 1

What kernel version are you using? This needs a configure check as more recent kernel versions seem to be using usbdevfs_ctrltransfer.

Regards,

Anthony Liguori

#2 lore raw
Quoted 16 lines · Anthony Liguori
Quoted 14 lines · Robert Reif

This patch fixes the following compile error:

usb-linux.c: In function `usb_linux_update_endp_table':
usb-linux.c:777: error: structure has no member named bRequestType' usb-linux.c:778: error: structure has no member named bRequest' usb-linux.c:779: error: structure has no member named wValue' usb-linux.c:780: error: structure has no member named wIndex' usb-linux.c:781: error: structure has no member named wLength' usb-linux.c:818: error: structure has no member named bRequestType' usb-linux.c:819: error: structure has no member named bRequest' usb-linux.c:820: error: structure has no member named wValue' usb-linux.c:821: error: structure has no member named wIndex' usb-linux.c:822: error: structure has no member named wLength'
make: *** [usb-linux.o] Error 1

Quoted 8 lines

What kernel version are you using? This needs a configure check as more recent kernel versions seem to be using usbdevfs_ctrltransfer.

Regards,

Anthony Liguori

RH9 system (2.4.20-31.9smp).

#3 lore raw
Quoted 19 lines · Robert Reif
Quoted 18 lines · Anthony Liguori
Quoted 14 lines · Robert Reif

This patch fixes the following compile error:

usb-linux.c: In function `usb_linux_update_endp_table':
usb-linux.c:777: error: structure has no member named bRequestType' usb-linux.c:778: error: structure has no member named bRequest' usb-linux.c:779: error: structure has no member named wValue' usb-linux.c:780: error: structure has no member named wIndex' usb-linux.c:781: error: structure has no member named wLength' usb-linux.c:818: error: structure has no member named bRequestType' usb-linux.c:819: error: structure has no member named bRequest' usb-linux.c:820: error: structure has no member named wValue' usb-linux.c:821: error: structure has no member named wIndex' usb-linux.c:822: error: structure has no member named wLength'
make: *** [usb-linux.o] Error 1

What kernel version are you using? This needs a configure check as more recent kernel versions seem to be using usbdevfs_ctrltransfer.

Quoted 7 lines
Quoted 6 lines

Regards,

Anthony Liguori

RH9 system (2.4.20-31.9smp).

Huh. I'm amazed it compiles with just that change on such an old kernel.

Regards,

Anthony Liguori

#4 lore raw
Quoted 4 lines · Anthony Liguori
Quoted 1 line · Robert Reif

RH9 system (2.4.20-31.9smp).

Huh. I'm amazed it compiles with just that change on such an old kernel.

I have similar problems compiling on a SuSE 10.1 system which really isn't that old. Since I only use linux-user I'd been too lazy to investigate the problem.

Why should Qemu not build on older systems? I'd imagine that linux 2.4 / 2.6 compatability would be easier to handle than linux /OSX /Windows compatability.

Vince

#5 lore raw
Quoted 10 lines · Vince Weaver
Quoted 4 lines · Anthony Liguori
Quoted 1 line · Robert Reif

RH9 system (2.4.20-31.9smp).

Huh. I'm amazed it compiles with just that change on such an old kernel.

I have similar problems compiling on a SuSE 10.1 system which really isn't that old. Since I only use linux-user I'd been too lazy to investigate the problem.

Why should Qemu not build on older systems? I'd imagine that linux 2.4 / 2.6 compatability would be easier to handle than linux /OSX /Windows compatability.

I think we should support 2.4 kernels FWIW. I'm just waiting for someone to send a patch that adds a configure check instead of breaking the build for newer kernels.

I think the best way to do it would be to try and detect the right header files for usb pass through in configure, and disable usb-linux.c entirely if they aren't available.

Regards,

Anthony LIguori

Quoted 3 lines

Vince

#6 lore raw
Quoted 12 lines · Anthony Liguori
Quoted 10 lines · Vince Weaver
Quoted 4 lines · Anthony Liguori
Quoted 1 line · Robert Reif

RH9 system (2.4.20-31.9smp).

Huh. I'm amazed it compiles with just that change on such an old kernel.

I have similar problems compiling on a SuSE 10.1 system which really isn't that old. Since I only use linux-user I'd been too lazy to investigate the problem.

Why should Qemu not build on older systems? I'd imagine that linux 2.4 / 2.6 compatability would be easier to handle than linux /OSX /Windows compatability.

Quoted 11 lines

I think we should support 2.4 kernels FWIW. I'm just waiting for someone to send a patch that adds a configure check instead of breaking the build for newer kernels.

I think the best way to do it would be to try and detect the right header files for usb pass through in configure, and disable usb-linux.c entirely if they aren't available.

Regards,

Anthony LIguori

Quoted 3 lines

Vince

The problem in this instance is that a structure that usb uses was copied from a linux header file so the c file wasn't dependent on linux headers. Unfortunately the c file wasn't changed to use the new structure.