]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
ccid-card: include libcacard.h only
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 3 Apr 2018 10:34:37 +0000 (12:34 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 27 Apr 2018 08:57:09 +0000 (10:57 +0200)
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>
configure
hw/usb/ccid-card-emulated.c
hw/usb/ccid-card-passthru.c

index 0a19b033bc203f102c305a4626e74a39007aa668..0a4f0da58f9ccc83e0a01773d4413964f106c7a7 100755 (executable)
--- a/configure
+++ b/configure
@@ -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"
index ea42e4681dd94aa92b58ba2711b4292fe2a4f163..5c8b3c99070a2364019f42c0564045f1a4eb4400 100644 (file)
  */
 
 #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"
index b7dd3602dc7a9205ac475e29cd2832b35987f60e..7684db0cb370f8c93c56fa643a025a0a05b29cfb 100644 (file)
@@ -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"