Received: from eggs.gnu.org ([208.118.235.92]:41577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USmqT-00021f-Gl for qemu-devel@nongnu.org; Thu, 18 Apr 2013 07:17:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USmqS-0004oJ-53 for qemu-devel@nongnu.org; Thu, 18 Apr 2013 07:17:41 -0400 From: Michael Tokarev Date: Thu, 18 Apr 2013 15:17:33 +0400 Message-Id: <1366283853-31785-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: [Qemu-devel] [PATCH] allow usage of older libusb which didn't define LIBUSB_LOG_LEVEL_WARNING List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev , qemu-devel@nongnu.org Older libusb does not have any LIBUSB_LOG_LEVEL_* definitions. Since we expose these values as integers anyway, just use the right define if the constant isn't defined. Signed-off-by: Michael Tokarev --- hw/usb/host-libusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 29f35b3..78c315f 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1251,6 +1251,9 @@ static Property usb_host_dev_properties[] = { DEFINE_PROP_UINT32("isobufs", USBHostDevice, iso_urb_count, 4), DEFINE_PROP_UINT32("isobsize", USBHostDevice, iso_urb_frames, 32), DEFINE_PROP_INT32("bootindex", USBHostDevice, bootindex, -1), +#ifndef LIBUSB_LOG_LEVEL_WARNING /* older libusb didn't define these */ +#define LIBUSB_LOG_LEVEL_WARNING 2 +#endif DEFINE_PROP_UINT32("loglevel", USBHostDevice, loglevel, LIBUSB_LOG_LEVEL_WARNING), DEFINE_PROP_BIT("pipeline", USBHostDevice, options, -- 1.7.10.4