|
Mark McLoughlin |
081ecc |
From 85da3db92e4b25275426e252974db7eae18e2bb1 Mon Sep 17 00:00:00 2001
|
|
Mark McLoughlin |
d298fd |
From: Mark McLoughlin <markmc@redhat.com>
|
|
Mark McLoughlin |
d298fd |
Date: Mon, 29 Jun 2009 16:09:45 +0100
|
|
Mark McLoughlin |
d298fd |
Subject: [PATCH] Fix pcspk build with kvm disabled
|
|
Mark McLoughlin |
d298fd |
MIME-Version: 1.0
|
|
Mark McLoughlin |
d298fd |
Content-Type: text/plain; charset=utf-8
|
|
Mark McLoughlin |
d298fd |
Content-Transfer-Encoding: 8bit
|
|
Mark McLoughlin |
d298fd |
|
|
Mark McLoughlin |
d298fd |
Errors are:
|
|
Mark McLoughlin |
d298fd |
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c:85: error: expected declaration specifiers or ‘...’ before ‘kvm_pit_state’
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c:87: error: expected declaration specifiers or ‘...’ before ‘kvm_pit_state’
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c: In function ‘pcspk_callback’:
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c:114: error: too many arguments to function ‘kvm_get_pit_ch2’
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c: In function ‘pcspk_ioport_read’:
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c:161: error: too many arguments to function ‘kvm_get_pit_ch2’
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c: In function ‘pcspk_ioport_write’:
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c:171: error: storage size of ‘inkernel_state’ isn’t known
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c:175: error: too many arguments to function ‘kvm_get_pit_ch2’
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c:185: error: too many arguments to function ‘kvm_set_pit_ch2’
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c:171: warning: unused variable ‘inkernel_state’
|
|
Mark McLoughlin |
d298fd |
|
|
Mark McLoughlin |
d298fd |
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
|
|
Mark McLoughlin |
d298fd |
Cc: Jan Kiszka <jan.kiszka@web.de>
|
|
Mark McLoughlin |
d298fd |
---
|
|
Mark McLoughlin |
d298fd |
hw/pcspk.c | 6 +++++-
|
|
Mark McLoughlin |
d298fd |
1 files changed, 5 insertions(+), 1 deletions(-)
|
|
Mark McLoughlin |
d298fd |
|
|
Mark McLoughlin |
d298fd |
diff --git a/hw/pcspk.c b/hw/pcspk.c
|
|
Mark McLoughlin |
d298fd |
index 9e1b59a..fb823d5 100644
|
|
Mark McLoughlin |
d298fd |
--- a/hw/pcspk.c
|
|
Mark McLoughlin |
d298fd |
+++ b/hw/pcspk.c
|
|
Mark McLoughlin |
d298fd |
@@ -80,11 +80,15 @@ static void kvm_set_pit_ch2(PITState *pit,
|
|
Mark McLoughlin |
d298fd |
kvm_set_pit(kvm_context, inkernel_state);
|
|
Mark McLoughlin |
d298fd |
}
|
|
Mark McLoughlin |
d298fd |
}
|
|
Mark McLoughlin |
d298fd |
-#else
|
|
Mark McLoughlin |
d298fd |
+#elif defined(USE_KVM)
|
|
Mark McLoughlin |
d298fd |
static inline void kvm_get_pit_ch2(PITState *pit,
|
|
Mark McLoughlin |
d298fd |
kvm_pit_state *inkernel_state) { }
|
|
Mark McLoughlin |
d298fd |
static inline void kvm_set_pit_ch2(PITState *pit,
|
|
Mark McLoughlin |
d298fd |
kvm_pit_state *inkernel_state) { }
|
|
Mark McLoughlin |
d298fd |
+#else
|
|
Mark McLoughlin |
d298fd |
+typedef struct kvm_pit_state { char dummy; } kvm_pit_state;
|
|
Mark McLoughlin |
d298fd |
+#define kvm_get_pit_ch2(p, s) do { (void)s; } while(0)
|
|
Mark McLoughlin |
d298fd |
+#define kvm_set_pit_ch2(p, s) do { (void)s; } while(0)
|
|
Mark McLoughlin |
d298fd |
#endif
|
|
Mark McLoughlin |
d298fd |
|
|
Mark McLoughlin |
d298fd |
static inline void generate_samples(PCSpkState *s)
|
|
Mark McLoughlin |
d298fd |
--
|
|
Mark McLoughlin |
d298fd |
1.6.2.5
|
|
Mark McLoughlin |
d298fd |
|