diff --git a/configure b/configure index f9ba9eaae7edbe5439a5fb3ec07eef8ced105679..1443422e83f1f857646b06eba3614cf49d41d1e4 100755 --- a/configure +++ b/configure @@ -4478,7 +4478,7 @@ fi # check for smartcard support if test "$smartcard" != "no"; then - if $pkg_config libcacard; then + if $pkg_config --atleast-version=2.5.1 libcacard; then libcacard_cflags=$($pkg_config --cflags libcacard) libcacard_libs=$($pkg_config --libs libcacard) smartcard="yes" diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index ea42e4681dd94aa92b58ba2711b4292fe2a4f163..5c8b3c99070a2364019f42c0564045f1a4eb4400 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -27,10 +27,7 @@ */ #include "qemu/osdep.h" -#include -#include -#include -#include +#include #include "qemu/thread.h" #include "qemu/main-loop.h" diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index b7dd3602dc7a9205ac475e29cd2832b35987f60e..7684db0cb370f8c93c56fa643a025a0a05b29cfb 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -9,7 +9,7 @@ */ #include "qemu/osdep.h" -#include +#include #include "chardev/char-fe.h" #include "qemu/error-report.h" #include "qemu/sockets.h" diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index e6468057a05326eef9d7ab307c96af9a308a960b..cabb56478833fba358230f54674c782dbf1ee063 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -329,8 +329,8 @@ static const uint8_t qemu_ccid_descriptor[] = { */ 0x07, /* u8 bVoltageSupport; 01h - 5.0v, 02h - 3.0, 03 - 1.8 */ - 0x00, 0x00, /* u32 dwProtocols; RRRR PPPP. RRRR = 0000h.*/ - 0x01, 0x00, /* PPPP: 0001h = Protocol T=0, 0002h = Protocol T=1 */ + 0x01, 0x00, /* u32 dwProtocols; RRRR PPPP. RRRR = 0000h.*/ + 0x00, 0x00, /* PPPP: 0001h = Protocol T=0, 0002h = Protocol T=1 */ /* u32 dwDefaultClock; in kHZ (0x0fa0 is 4 MHz) */ 0xa0, 0x0f, 0x00, 0x00, /* u32 dwMaximumClock; */ diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 1b0be071ccc08445469b40fb22a6c457a8335b73..dc0a8fe295eeff51fc9fe795a7b3bcc9fe726791 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -247,7 +247,11 @@ static int usb_host_init(void) if (rc != 0) { return -1; } +#if LIBUSB_API_VERSION >= 0x01000106 + libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, loglevel); +#else libusb_set_debug(ctx, loglevel); +#endif #ifdef CONFIG_WIN32 /* FIXME: add support for Windows. */ #else