From: Howard Spoelstra <hsp.cat7@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH] usb: fix usb-host build on windows.
Date: Wed, 24 Jun 2020 17:19:51 +0200 [thread overview]
Message-ID: <CABLmASFxUtOJOCYk2epuiJwOh0dbxzer0A=AG42O6QqvXbN+EQ@mail.gmail.com> (raw)
In-Reply-To: <20200624134510.9381-1-kraxel@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]
On Wed, Jun 24, 2020 at 3:45 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
> Seems the new API is not available on windows.
> Update #ifdefs accordingly.
>
> Fixes: 9f815e83e983 ("usb: add hostdevice property to usb-host")
> Reported-by: Howard Spoelstra <hsp.cat7@gmail.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/usb/host-libusb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
> index ad7ed8fb0c67..c474551d8456 100644
> --- a/hw/usb/host-libusb.c
> +++ b/hw/usb/host-libusb.c
> @@ -907,7 +907,7 @@ static int usb_host_open(USBHostDevice *s,
> libusb_device *dev, int hostfd)
> goto fail;
> }
> } else {
> -#if LIBUSB_API_VERSION >= 0x01000107
> +#if LIBUSB_API_VERSION >= 0x01000107 && !defined(CONFIG_WIN32)
> trace_usb_host_open_hostfd(hostfd);
>
> rc = libusb_wrap_sys_device(ctx, hostfd, &s->dh);
> @@ -1107,7 +1107,7 @@ static void usb_host_realize(USBDevice *udev, Error
> **errp)
> QTAILQ_INIT(&s->isorings);
> s->hostfd = -1;
>
> -#if LIBUSB_API_VERSION >= 0x01000107
> +#if LIBUSB_API_VERSION >= 0x01000107 && !defined(CONFIG_WIN32)
> if (s->hostdevice) {
> int fd;
> s->needs_autoscan = false;
> --
> 2.18.4
>
> Thanks for the quick fix, so:
Tested-by: Howard Spoelstra <hsp.cat7@gmail.com>
[-- Attachment #2: Type: text/html, Size: 2070 bytes --]
next prev parent reply other threads:[~2020-06-24 15:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 13:45 [PATCH] usb: fix usb-host build on windows Gerd Hoffmann
2020-06-24 15:19 ` Howard Spoelstra [this message]
2020-06-24 16:14 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABLmASFxUtOJOCYk2epuiJwOh0dbxzer0A=AG42O6QqvXbN+EQ@mail.gmail.com' \
--to=hsp.cat7@gmail.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).