qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: Michal Privoznik <mprivozn@redhat.com>
Cc: QEMU <qemu-devel@nongnu.org>, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] ccid-card: include libcacard.h only
Date: Tue, 3 Apr 2018 16:54:55 +0200	[thread overview]
Message-ID: <CAJ+F1C++rpmeA-Ve9wKCTJc7=+aCjTQxi-+SW4Kod77AuXB5Ow@mail.gmail.com> (raw)
In-Reply-To: <7c6e36a4-f03f-1042-dc34-cfaf48d7518a@redhat.com>

Hi

On Tue, Apr 3, 2018 at 1:48 PM, Michal Privoznik <mprivozn@redhat.com> wrote:
> On 04/03/2018 01:38 PM, Marc-André Lureau wrote:
>> Hi
>>
>> On Tue, Apr 3, 2018 at 12:34 PM, Michal Privoznik <mprivozn@redhat.com> wrote:
>>> 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>
>>> ---
>>>
>>> diff to v1:
>>> - Introduce configure change to require newer libcacard version
>>>
>>>  configure                   | 2 +-
>>>  hw/usb/ccid-card-emulated.c | 5 +----
>>>  hw/usb/ccid-card-passthru.c | 2 +-
>>>  3 files changed, 3 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/configure b/configure
>>> index 4d0e92c96c..0edec24fff 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -4440,7 +4440,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 ea42e4681d..7b538ae6da 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 <cacard/libcacard.h>
>>
>> You should be able to #include <libcacard.h> only.
>
> Yes, you're right. Do you want me to resend or will you handle this when
> merging the patch?

I'll let Gerd decide:
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>



-- 
Marc-André Lureau

  reply	other threads:[~2018-04-03 14:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 10:34 [Qemu-devel] [PATCH v2] ccid-card: include libcacard.h only Michal Privoznik
2018-04-03 11:38 ` Marc-André Lureau
2018-04-03 11:48   ` Michal Privoznik
2018-04-03 14:54     ` Marc-André Lureau [this message]
2018-04-27  8:58 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ+F1C++rpmeA-Ve9wKCTJc7=+aCjTQxi-+SW4Kod77AuXB5Ow@mail.gmail.com' \
    --to=marcandre.lureau@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=mprivozn@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).