From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnNb0-0003Xx-Vf for qemu-devel@nongnu.org; Fri, 23 Sep 2016 06:20:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnNaw-0007LO-8H for qemu-devel@nongnu.org; Fri, 23 Sep 2016 06:20:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnNav-0007L9-QG for qemu-devel@nongnu.org; Fri, 23 Sep 2016 06:20:38 -0400 Date: Fri, 23 Sep 2016 11:20:31 +0100 From: "Daniel P. Berrange" Message-ID: <20160923102031.GC29098@redhat.com> Reply-To: "Daniel P. Berrange" References: <1474534599-322216-1-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1474534599-322216-1-git-send-email-arei.gonglei@huawei.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] qtest: fix make check complaint in crypto module List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gonglei Cc: qemu-devel@nongnu.org, wu.wubin@huawei.com On Thu, Sep 22, 2016 at 04:56:39PM +0800, Gonglei wrote: > CC tests/test-crypto-tlscredsx509.o > CC tests/crypto-tls-x509-helpers.o > CC tests/pkix_asn1_tab.o > tests/pkix_asn1_tab.c:7:22: warning: libtasn1.h: No such file or direct= ory > tests/pkix_asn1_tab.c:9: error: expected =E2=80=98=3D=E2=80=99, =E2=80=98= ,=E2=80=99, =E2=80=98;=E2=80=99, =E2=80=98asm=E2=80=99 or =E2=80=98__attr= ibute__=E2=80=99 before =E2=80=98pkix_asn1_tab=E2=80=99 > make: *** [tests/pkix_asn1_tab.o] Error 1 >=20 > Signed-off-by: Gonglei > --- > v2: add condition check for TLS support (Daniel) > --- > tests/pkix_asn1_tab.c | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > diff --git a/tests/pkix_asn1_tab.c b/tests/pkix_asn1_tab.c > index 903bc02..036e222b 100644 > --- a/tests/pkix_asn1_tab.c > +++ b/tests/pkix_asn1_tab.c > @@ -4,6 +4,14 @@ > */ > =20 > #include "qemu/osdep.h" > +#if !(defined WIN32) && \ > + defined(CONFIG_TASN1) && \ > + (LIBGNUTLS_VERSION_NUMBER >=3D 0x020600) > +#define QCRYPTO_HAVE_TLS_TEST_SUPPORT > +#endif This doesn't actually build tests/pkix_asn1_tab.c:9:6: error: "LIBGNUTLS_VERSION_NUMBER" is not defin= ed [-Werror=3Dundef] (LIBGNUTLS_VERSION_NUMBER >=3D 0x020600) ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors /home/berrange/src/virt/qemu/rules.mak:60: recipe for target 'tests/pkix_= asn1_tab.o' failed make: *** [tests/pkix_asn1_tab.o] Error 1 This is because you missed the gnutls.h include. Rather than repeating the condition here, you sould just #include the existing tests/crypto-tls-x509-helpers.h header > + > +#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT > + > #include > =20 > const ASN1_ARRAY_TYPE pkix_asn1_tab[] =3D { > @@ -1103,3 +1111,4 @@ const ASN1_ARRAY_TYPE pkix_asn1_tab[] =3D { > {0, 1048586, "2"}, > {0, 0, 0} > }; > +#endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */ > --=20 Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|