qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] usb: Support compilation without poll.h


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] usb: Support compilation without poll.h
Date: Wed, 11 May 2016 10:14:58 +0100

On 22 March 2016 at 07:13, Stefan Weil <address@hidden> wrote:
> This is a hack to support compilation with Mingw-w64 which provides
> a libusb-1.0 package, but no poll.h.
>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
>
> v2: Modified after feedback from Gerd.

>  static int usb_host_init(void)
>  {
> +#ifndef CONFIG_WIN32
>      const struct libusb_pollfd **poll;
> +#endif
>      int i, rc;
>
>      if (ctx) {
> @@ -235,7 +243,9 @@ static int usb_host_init(void)
>          return -1;
>      }
>      libusb_set_debug(ctx, loglevel);
> -
> +#ifdef CONFIG_WIN32
> +    /* FIXME: add support for Windows. */
> +#else
>      libusb_set_pollfd_notifiers(ctx, usb_host_add_fd,
>                                  usb_host_del_fd,
>                                  ctx);
> @@ -246,6 +256,7 @@ static int usb_host_init(void)
>          }
>      }
>      free(poll);
> +#endif
>      return 0;

Would it make more sense to just disable this functionality
entirely rather than leaving it compiling but not working?

thanks
-- PMM



reply via email to

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