diff mbox

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

Message ID 1415176522-5944-1-git-send-email-chrisj@rtems.org
State New
Headers show

Commit Message

Chris Johns Nov. 5, 2014, 8:35 a.m. UTC
Signed-off-by: Chris Johns <chrisj@rtems.org>
---
 hw/usb/host-libusb.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Gerd Hoffmann Nov. 5, 2014, 9:51 a.m. UTC | #1
On Mi, 2014-11-05 at 19:35 +1100, Chris Johns wrote:
> +#ifndef LIBUSB_LOG_LEVEL_WARNING /* older libusb didn't define these
> */
> +#define LIBUSB_LOG_LEVEL_WARNING 2
> +#endif

Added to usb patch queue.

thanks,
  Gerd
diff mbox

Patch

diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index d2d161b..032a0e4 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -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 */