From: Will Deacon Subject: Re: [RFC PATCH 05/16] kvm tools: don't bother including linux/compiler.h Date: Fri, 16 Nov 2012 10:06:52 +0000 Message-ID: <20121116100652.GB25018@mudshark.cambridge.arm.com> References: <1352721450-11340-1-git-send-email-will.deacon@arm.com> <1352721450-11340-6-git-send-email-will.deacon@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "kvm@vger.kernel.org" , Marc Zyngier , "c.dall@virtualopensystems.com" , Matt Evans , "peter.maydell@linaro.org" To: Pekka Enberg Return-path: Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:38696 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751365Ab2KPKHH (ORCPT ); Fri, 16 Nov 2012 05:07:07 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: [ apologies if you receive this twice -- my email is playing up ] Hi Pekka, On Tue, Nov 13, 2012 at 07:26:36AM +0000, Pekka Enberg wrote: > On Mon, 12 Nov 2012, Will Deacon wrote: > > diff --git a/tools/kvm/include/linux/stddef.h b/tools/kvm/include/l= inux/stddef.h > > index 60ea512..39da808 100644 > > --- a/tools/kvm/include/linux/stddef.h > > +++ b/tools/kvm/include/linux/stddef.h > > @@ -1,16 +1,10 @@ > > #ifndef _LINUX_STDDEF_H > > #define _LINUX_STDDEF_H > > =20 > > -#include > > - > > #undef NULL > > #define NULL ((void *)0) > > =20 > > #undef offsetof > > -#ifdef __compiler_offsetof > > -#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) > > -#else > > #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) > > -#endif > > =20 > > #endif >=20 > I'm seeing the following breakage with this patch applied: >=20 > [penberg@tux kvm]$ make > CC hw/rtc.o > CC ioport.o > CC kvm-cpu.o > CC kvm.o > In file included from include/kvm/rbtree-interval.h:4:0, > from include/kvm/ioport.h:4, > from hw/rtc.c:3: > ../../include/linux/rbtree_augmented.h:125:24: 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__attribute__=E2=80=99 before =E2=80=98void=E2=80= =99 > In file included from include/kvm/rbtree-interval.h:4:0, > from include/kvm/ioport.h:4, > from ioport.c:1: > ../../include/linux/rbtree_augmented.h:125:24: 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__attribute__=E2=80=99 before =E2=80=98void=E2=80= =99 > make: *** [hw/rtc.o] Error 1 > make: *** Waiting for unfinished jobs.... > make: *** [ioport.o] Error 1 I'm struggling to reproduce this with my tree. Can you confirm whether = or not you have commit 29fc7c5a4f51 ("rbtree: include linux/compiler.h for definition of __always_inline") in your *kernel* sources please? Cheers, Will