qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] hw/usb/host-libusb.c: fix build with kernel < 5.0


From: Gerd Hoffmann
Subject: Re: [PATCH v2] hw/usb/host-libusb.c: fix build with kernel < 5.0
Date: Tue, 15 Dec 2020 08:58:33 +0100

On Sun, Dec 13, 2020 at 10:30:16PM +0100, Fabrice Fontaine wrote:
> USBDEVFS_GET_SPEED is used since version 5.2.0 and
> https://gitlab.com/qemu-project/qemu/-/commit/202d69a715a4b1824dcd7ec1683d027ed2bae6d3
> resulting in the following build failure with kernel < 5.0:
> 
> ../hw/usb/host-libusb.c: In function 'usb_host_open':
> ../hw/usb/host-libusb.c:953:32: error: 'USBDEVFS_GET_SPEED' undeclared (first 
> use in this function); did you mean 'USBDEVFS_GETDRIVER'?
>          int rc = ioctl(hostfd, USBDEVFS_GET_SPEED, NULL);
>                                 ^~~~~~~~~~~~~~~~~~
>                                 USBDEVFS_GETDRIVER
> 
> A tentative was made to fix this build failure with
> https://gitlab.com/qemu-project/qemu/-/commit/4969e697c15ac536d5c0700381d5d026ef7f0588
> 
> However, the assumption that distros with old kernels also have old
> libusb is just wrong so also add a check for defined(USBDEVFS_GET_SPEED)
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Added to usb queue.

thanks,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]