qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] allow usage of older libusb which didn't define LIB


From: Michael Tokarev
Subject: [Qemu-devel] [PATCH] allow usage of older libusb which didn't define LIBUSB_LOG_LEVEL_WARNING
Date: Thu, 18 Apr 2013 15:17:33 +0400

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 <address@hidden>
---
 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




reply via email to

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