Skip to contentSkip to conversation

Provide the missing LIBUSB_LOG_LEVEL_* for older libusb or FreeBSD. Providing just the needed value as a defined.

PATCH In review Chris Johns 2 participants 2 messages Nov 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Provide the missing LIBUSB_LOG_LEVEL_* for older libusb or FreeBSD. Providing just the needed value as a defined.

---
 hw/usb/host-libusb.c | 6 ++++++
 1 file changed, 6 insertions(+)
hw/usb/host-libusb.c +6 -0
index d2d161b..032a0e4 100644
@@ -143,6 +143,12 @@ static void usb_host_attach_kernel(USBHostDevice *s);
 
 /* ------------------------------------------------------------------------ */
 
+#ifndef LIBUSB_LOG_LEVEL_WARNING /* older libusb didn't define these */
+#define LIBUSB_LOG_LEVEL_WARNING 2
+#endif
+
+/* ------------------------------------------------------------------------ */
+
 #define CONTROL_TIMEOUT  10000        /* 10 sec    */
 #define BULK_TIMEOUT         0        /* unlimited */
 #define INTR_TIMEOUT         0        /* unlimited */
Signature · 1 line
2.1.2
#1 lore raw

hw/usb/host-libusb.c static void usb_host_attach_kernel(USBHostDevice *s); · line 148

Quoted 4 lines · Chris Johns

+#ifndef LIBUSB_LOG_LEVEL_WARNING /* older libusb didn't define these */

hw/usb/host-libusb.c +2 -0
+#define LIBUSB_LOG_LEVEL_WARNING 2
+#endif

Added to usb patch queue.

thanks,
Gerd