Skip to contentSkip to conversation

ccid: use libcacard.h from 2.5.1

PATCH In review [email protected] 4 participants 5 messages Dec 18, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ccid: use libcacard.h from 2.5.1

From: Marc-André Lureau <[email protected]>

This cleans up a bit libcacard headers inclusion.

---
 configure                   | 7 ++++---
 hw/usb/ccid-card-emulated.c | 5 +----
 hw/usb/ccid-card-passthru.c | 2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)
configure +4 -3
index b9552fd..65dc5ed 100755
@@ -3981,17 +3981,18 @@ EOF
 fi
 
 # check for smartcard support
+libcacard_version=2.5.1
 smartcard_cflags=""
 if test "$smartcard" != "no"; then
-    if $pkg_config libcacard; then
+    if $pkg_config "libcacard >= $libcacard_version"; then
         libcacard_cflags=$($pkg_config --cflags libcacard)
         libcacard_libs=$($pkg_config --libs libcacard)
-        QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags"
+        QEMU_CFLAGS= $QEMU_CFLAGS $libcacard_cflags""
         libs_softmmu="$libs_softmmu $libcacard_libs"
         smartcard="yes"
     else
         if test "$smartcard" = "yes"; then
-            feature_not_found "smartcard" "Install libcacard devel"
+            feature_not_found "smartcard" "Install libcacard(>=$libcacard_version) devel"
         fi
         smartcard="no"
     fi
hw/usb/ccid-card-emulated.c +1 -4
index 869a63c..25d3e3f 100644
@@ -26,10 +26,7 @@
  * the db parameter.
  */
 
-#include <eventt.h>
-#include <vevent.h>
-#include <vreader.h>
-#include <vcard_emul.h>
+#include <libcacard.h>
 
 #include "qemu/thread.h"
 #include "sysemu/char.h"
hw/usb/ccid-card-passthru.c +1 -1
index 9f49c05..f4c276f 100644
@@ -12,7 +12,7 @@
 #include "qemu/error-report.h"
 #include "qemu/sockets.h"
 #include "ccid.h"
-#include "cacard/vscard_common.h"
+#include <libcacard.h>
 
 #define DPRINTF(card, lvl, fmt, ...)                    \
 do {                                                    \
Signature · 1 line
2.5.0
#1 lore raw
Quoted 10 lines · On 18/12/2015 10:49, [email protected] wrote:

From: Marc-André Lureau <[email protected]>

This cleans up a bit libcacard headers inclusion.

---
 configure                   | 7 ++++---
 hw/usb/ccid-card-emulated.c | 5 +----
 hw/usb/ccid-card-passthru.c | 2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)

Are there any distros that have not packaged libcacard yet? This will break compatibility with QEMU 2.4's libcacard, I think.

Paolo

#2 lore raw

Hi

----- Original Message -----

Quoted 14 lines · On 18/12/2015 10:49, [email protected] wrote:
Quoted 10 lines

From: Marc-André Lureau <[email protected]>

This cleans up a bit libcacard headers inclusion.

---
 configure                   | 7 ++++---
 hw/usb/ccid-card-emulated.c | 5 +----
 hw/usb/ccid-card-passthru.c | 2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)
Quoted 2 lines

Are there any distros that have not packaged libcacard yet? This will break compatibility with QEMU 2.4's libcacard, I think.

I bumped libcacard requirement to 2.5.1 in the patch.

#3 lore raw
Quoted 8 lines · Marc-André Lureau
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
 configure                   | 7 ++++---
 hw/usb/ccid-card-emulated.c | 5 +----
 hw/usb/ccid-card-passthru.c | 2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)

Are there any distros that have not packaged libcacard yet? This will break compatibility with QEMU 2.4's libcacard, I think.

I bumped libcacard requirement to 2.5.1 in the patch.

Yes, the question is whether distributions would have problems with that.

Paolo