From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfT0m-0005os-25 for qemu-devel@nongnu.org; Thu, 01 Sep 2016 10:30:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfT0g-00011y-Sl for qemu-devel@nongnu.org; Thu, 01 Sep 2016 10:30:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfT0g-0000zk-K0 for qemu-devel@nongnu.org; Thu, 01 Sep 2016 10:30:30 -0400 References: <16b62ea67fcc34be255541423fbb1db9cdc1c258.1472720373.git.mprivozn@redhat.com> From: Eric Blake Message-ID: <0cf35ce3-1e7b-0a81-3d5c-bfa1396c5015@redhat.com> Date: Thu, 1 Sep 2016 09:30:27 -0500 MIME-Version: 1.0 In-Reply-To: <16b62ea67fcc34be255541423fbb1db9cdc1c258.1472720373.git.mprivozn@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vXhunEpN4IOmKvaSbnof0KP8DdpL8RQIB" Subject: Re: [Qemu-devel] [PATCH] tests: Fix broken tcg test compilation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Privoznik , qemu-devel@nongnu.org Cc: veroniabahaa@gmail.com, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vXhunEpN4IOmKvaSbnof0KP8DdpL8RQIB From: Eric Blake To: Michal Privoznik , qemu-devel@nongnu.org Cc: veroniabahaa@gmail.com, pbonzini@redhat.com Message-ID: <0cf35ce3-1e7b-0a81-3d5c-bfa1396c5015@redhat.com> Subject: Re: [Qemu-devel] [PATCH] tests: Fix broken tcg test compilation References: <16b62ea67fcc34be255541423fbb1db9cdc1c258.1472720373.git.mprivozn@redhat.com> In-Reply-To: <16b62ea67fcc34be255541423fbb1db9cdc1c258.1472720373.git.mprivozn@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/01/2016 04:02 AM, Michal Privoznik wrote: > The first build error to be seen is that linux-test.c fails to > include cutils.h: >=20 > linux-test.c:42:25: fatal error: qemu/cutils.h: No such file or directo= ry >=20 > This is because toplevel include/ dir is not put onto compiler's > command line. After that: >=20 > qemu.git/include/qemu/cutils.h:171:1: error: unknown type name =E2=80=98= bool=E2=80=99 >=20 > So we need to include "qemu/osdep.h" which will define bool type > for us. However, osdep.h eventually includes glib.h from system, > therefore we need to put GLIB_CFLAGS onto compiler's command line > too. >=20 > Lastly, getrusage is used in linux-test.c. This function and a > struct it uses are defined in sys/resource.h: >=20 > linux-test.c:247:5: warning: implicit declaration of function =E2=80=98= getrusage=E2=80=99 >=20 > Signed-off-by: Michal Privoznik > --- >=20 > +++ b/tests/tcg/linux-test.c > @@ -31,6 +31,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -39,6 +40,7 @@ > #include > #include > #include > +#include "qemu/osdep.h" osdep.h has to be included first, before any system headers (in case it sets defines that modify the behavior of those system headers). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --vXhunEpN4IOmKvaSbnof0KP8DdpL8RQIB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXyDuDAAoJEKeha0olJ0Nq8N0H/1dLoMx5mS0hM2qpF9sTr/oZ eVqPX5D93IJlCWPeb5UHcc3mnyRtUY8hDOUgtcok3JXGhfEzV7iCQ7LXDOts9Y+X XYAODKhHcg7zZsICzEy3i/IcUdpM+pEM0FpHm3wvf13CrHzRiwAP+2K+CtMlF21M DC42rK7jHRIqjv486pLVWVQyG/VYER1XcXZfk8I1FGmWAGJwXbUXsCzBqDV0DTV2 NTF2HlN6dAVJPUNITlwLWprsIjq4vKSB/sTGac2WQ1uId+lTJp5Mf4HOuYO+ggYp IG4SofKk60qGS8sBtEva1EmSSfFXfHhtbAvfn6ntGzYqK2ixz3vyC2ilyJSTTd0= =Xjhw -----END PGP SIGNATURE----- --vXhunEpN4IOmKvaSbnof0KP8DdpL8RQIB--