rpms/qemu/devel qemu-fix-pcspk-build-with-kvm-disabled.patch, NONE, 1.1 qemu.spec, 1.101, 1.102

Mark McLoughlin markmc at fedoraproject.org
Mon Jun 29 15:13:55 UTC 2009


Author: markmc

Update of /cvs/pkgs/rpms/qemu/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8221

Modified Files:
	qemu.spec 
Added Files:
	qemu-fix-pcspk-build-with-kvm-disabled.patch 
Log Message:
Fix hw/pcspk.c build with --disable-kvm


qemu-fix-pcspk-build-with-kvm-disabled.patch:

--- NEW FILE qemu-fix-pcspk-build-with-kvm-disabled.patch ---
>From 71f761fc6f6289c47fb31ed1ba192f813fb39c58 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Mon, 29 Jun 2009 16:09:45 +0100
Subject: [PATCH] Fix pcspk build with kvm disabled
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Errors are:

  hw/pcspk.c:85: error: expected declaration specifiers or ‘...’ before ‘kvm_pit_state’
  hw/pcspk.c:87: error: expected declaration specifiers or ‘...’ before ‘kvm_pit_state’
  hw/pcspk.c: In function ‘pcspk_callback’:
  hw/pcspk.c:114: error: too many arguments to function ‘kvm_get_pit_ch2’
  hw/pcspk.c: In function ‘pcspk_ioport_read’:
  hw/pcspk.c:161: error: too many arguments to function ‘kvm_get_pit_ch2’
  hw/pcspk.c: In function ‘pcspk_ioport_write’:
  hw/pcspk.c:171: error: storage size of ‘inkernel_state’ isn’t known
  hw/pcspk.c:175: error: too many arguments to function ‘kvm_get_pit_ch2’
  hw/pcspk.c:185: error: too many arguments to function ‘kvm_set_pit_ch2’
  hw/pcspk.c:171: warning: unused variable ‘inkernel_state’

Signed-off-by: Mark McLoughlin <markmc at redhat.com>
Cc: Jan Kiszka <jan.kiszka at web.de>
---
 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
 
 static inline void generate_samples(PCSpkState *s)
-- 
1.6.2.5



Index: qemu.spec
===================================================================
RCS file: /cvs/pkgs/rpms/qemu/devel/qemu.spec,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -p -r1.101 -r1.102
--- qemu.spec	29 Jun 2009 14:01:31 -0000	1.101
+++ qemu.spec	29 Jun 2009 15:13:25 -0000	1.102
@@ -25,6 +25,9 @@ Patch02: qemu-fix-ppc-softmmu-kvm-disabl
 # Works around broken linux-user build on ppc
 Patch03: qemu-fix-broken-elf-coredump-build-on-ppc.patch
 
+# Fix for hw/pcspk.c errors with --disable-kvm
+Patch04: qemu-fix-pcspk-build-with-kvm-disabled.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
 BuildRequires: rsync dev86 iasl
@@ -208,6 +211,7 @@ such as kvmtrace and kvm_stat.
 %patch01 -p1
 %patch02 -p1
 %patch03 -p1
+%patch04 -p1
 
 %build
 # systems like rhel build system does not have a recent enough linker so
@@ -456,6 +460,7 @@ fi
 - Drop upstreamed patches
 - Cherry-pick new ppc build fix from upstream
 - Work around broken linux-user build on ppc
+- Fix hw/pcspk.c build with --disable-kvm
 - Re-enable preadv()/pwritev() since #497429 is long since fixed
 
 * Fri Jun  5 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10.50-6.kvm86




More information about the fedora-extras-commits mailing list