diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2018-04-03 12:34:37 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-04-27 10:57:09 +0200 |
commit | 0f5c642d49c3a843bd8b8790d7014fd84bcf6405 (patch) | |
tree | 3ee4d3db1f481f13f49cbba4ab2fba871b4a32b9 | |
parent | 9d8fa0df49af16a208fa961c2968fba4daffcc07 (diff) | |
download | qemu-0f5c642d49c3a843bd8b8790d7014fd84bcf6405.zip qemu-0f5c642d49c3a843bd8b8790d7014fd84bcf6405.tar.gz qemu-0f5c642d49c3a843bd8b8790d7014fd84bcf6405.tar.bz2 |
ccid-card: include libcacard.h only
When trying to build with latest libcacard-2.5.1, I hit the
following error:
In file included from hw/usb/ccid-card-passthru.c:12:0:
/usr/include/cacard/vscard_common.h:26:2: error: #warning "Only <libcacard.h> can be included directly" [-Werror=cpp]
#warning "Only <libcacard.h> can be included directly"
While it was fixed in libcacard upstream (so that individual
files can be included directly), it doesn't make much sense.
Let's switch to including the main libcacard.h and also require
at least libcacard-2.5.1 which introduced it. It's available
since late 2015.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 3c36db1dc0702763ebb7966cc27428ed67d43804.1522751624.git.mprivozn@redhat.com
[ kraxel: fix include path ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | hw/usb/ccid-card-emulated.c | 5 | ||||
-rw-r--r-- | hw/usb/ccid-card-passthru.c | 2 |
3 files changed, 3 insertions, 6 deletions
@@ -4449,7 +4449,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 ea42e46..5c8b3c9 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -27,10 +27,7 @@ */ #include "qemu/osdep.h" -#include <eventt.h> -#include <vevent.h> -#include <vreader.h> -#include <vcard_emul.h> +#include <libcacard.h> #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 b7dd360..7684db0 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -9,7 +9,7 @@ */ #include "qemu/osdep.h" -#include <cacard/vscard_common.h> +#include <libcacard.h> #include "chardev/char-fe.h" #include "qemu/error-report.h" #include "qemu/sockets.h" |