From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: [PATCH] Fix pcspk build with kvm disabled Date: Mon, 29 Jun 2009 16:19:22 +0100 Message-ID: <1246288762.11688.39.camel@blaa> Reply-To: Mark McLoughlin Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Jan Kiszka , kvm To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:60961 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752688AbZF2PTb (ORCPT ); Mon, 29 Jun 2009 11:19:31 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Errors are: hw/pcspk.c:85: error: expected declaration specifiers or =E2=80=98...= =E2=80=99 before =E2=80=98kvm_pit_state=E2=80=99 hw/pcspk.c:87: error: expected declaration specifiers or =E2=80=98...= =E2=80=99 before =E2=80=98kvm_pit_state=E2=80=99 hw/pcspk.c: In function =E2=80=98pcspk_callback=E2=80=99: hw/pcspk.c:114: error: too many arguments to function =E2=80=98kvm_ge= t_pit_ch2=E2=80=99 hw/pcspk.c: In function =E2=80=98pcspk_ioport_read=E2=80=99: hw/pcspk.c:161: error: too many arguments to function =E2=80=98kvm_ge= t_pit_ch2=E2=80=99 hw/pcspk.c: In function =E2=80=98pcspk_ioport_write=E2=80=99: hw/pcspk.c:171: error: storage size of =E2=80=98inkernel_state=E2=80=99= isn=E2=80=99t known hw/pcspk.c:175: error: too many arguments to function =E2=80=98kvm_ge= t_pit_ch2=E2=80=99 hw/pcspk.c:185: error: too many arguments to function =E2=80=98kvm_se= t_pit_ch2=E2=80=99 hw/pcspk.c:171: warning: unused variable =E2=80=98inkernel_state=E2=80= =99 Signed-off-by: Mark McLoughlin Cc: Jan Kiszka --- hw/pcspk.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/hw/pcspk.c b/hw/pcspk.c index 9e1b59a..fb823d5 100644 --- a/hw/pcspk.c +++ b/hw/pcspk.c @@ -80,11 +80,15 @@ static void kvm_set_pit_ch2(PITState *pit, kvm_set_pit(kvm_context, inkernel_state); } } -#else +#elif defined(USE_KVM) static inline void kvm_get_pit_ch2(PITState *pit, kvm_pit_state *inkernel_state) { } static inline void kvm_set_pit_ch2(PITState *pit, kvm_pit_state *inkernel_state) { } +#else +typedef struct kvm_pit_state { char dummy; } kvm_pit_state; +#define kvm_get_pit_ch2(p, s) do { (void)s; } while(0) +#define kvm_set_pit_ch2(p, s) do { (void)s; } while(0) #endif =20 static inline void generate_samples(PCSpkState *s) --=20 1.6.2.5