From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQecO-0004yM-Mg for qemu-devel@nongnu.org; Mon, 30 Sep 2013 10:38:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQecI-0004CF-N2 for qemu-devel@nongnu.org; Mon, 30 Sep 2013 10:38:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQecI-0004CA-EU for qemu-devel@nongnu.org; Mon, 30 Sep 2013 10:38:30 -0400 Date: Mon, 30 Sep 2013 17:40:50 +0300 From: "Michael S. Tsirkin" Message-ID: <20130930144050.GB22806@redhat.com> References: <1380452123-5989-1-git-send-email-mst@redhat.com> <1380452123-5989-2-git-send-email-mst@redhat.com> <20130930151056.32699e7f@nial.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20130930151056.32699e7f@nial.usersys.redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v6 01/26] qemu: add Error to typedefs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: pbonzini@redhat.com, kraxel@redhat.com, qemu-devel@nongnu.org, afaerber@suse.de On Mon, Sep 30, 2013 at 03:10:56PM +0200, Igor Mammedov wrote: > On Sun, 29 Sep 2013 13:58:24 +0300 > "Michael S. Tsirkin" wrote: >=20 > > This is so qom headers can use it without pulling in > > extra headers. > >=20 > > Reviewed-by: Paolo Bonzini > > Signed-off-by: Michael S. Tsirkin > > --- > > include/qemu/typedefs.h | 1 + > > 1 file changed, 1 insertion(+) > >=20 > > diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h > > index a4c1b84..46c3599 100644 > > --- a/include/qemu/typedefs.h > > +++ b/include/qemu/typedefs.h > > @@ -7,6 +7,7 @@ typedef struct QEMUTimer QEMUTimer; > > typedef struct QEMUTimerListGroup QEMUTimerListGroup; > > typedef struct QEMUFile QEMUFile; > > typedef struct QEMUBH QEMUBH; > > +typedef struct Error Error; > > =20 > > typedef struct AioContext AioContext; > > =20 >=20 > fc19 seems to ok with it but rhel6/gcc-4.4.7-4 isn't > ./configure --enable-kvm --target-list=3Dx86_64-softmmu,x86_64-linux-us= er >=20 > In file included from /qemu/include/qapi/visitor.h:18, > from qapi-visit.h:20, > from qapi-visit.c:18: > /qemu/include/qapi/error.h:23: error: redefinition of typedef =E2=80=98= Error=E2=80=99 > /qemu/include/qemu/typedefs.h:10: note: previous declaration of =E2=80=98= Error=E2=80=99 was here Thanks, I'll move that out of qemu/error.h, applying the following on top should fix it, right? Signed-off-by: Michael S. Tsirkin -- diff --git a/include/qapi/error.h b/include/qapi/error.h index 7d4c696..b85e996 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -13,14 +13,15 @@ #define ERROR_H =20 #include "qemu/compiler.h" +#include "qemu/typedefs.h" #include "qapi-types.h" #include =20 /** - * A class representing internal errors within QEMU. An error has a Err= orClass + * Error: + * An object representing internal errors within QEMU. An error has a E= rrorClass * code and a human message. */ -typedef struct Error Error; =20 /** * Set an indirect pointer to an error given a ErrorClass value and a