kvm fix compilation with GCC 4.3.4
PATCH 1/1 kvm fix compilation with GCC 4.3.4
As usual, SLES11's GCC complained about double typedefs:
/home/cohuck/git/qemu/kvm-all.c:110: error: redefinition of typedef ‘KVMState’ /home/cohuck/git/qemu/include/sysemu/kvm.h:161: error: previous declaration of ‘KVMState’ was here
--- kvm-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kvm-all.c +2 -2
@@ -71,7 +71,7 @@ typedef struct KVMSlottypedef struct kvm_dirty_log KVMDirtyLog ; -typedef struct KVMState +struct KVMState {AccelState parent_obj;
@@ -107,7 +107,7 @@ typedef struct KVMState QTAILQ_HEAD(msi_hashtab, KVMMSIRoute) msi_hashtab[KVM_MSI_HASHTAB_SIZE];bool direct_msi;#endif -} KVMState; +};#define TYPE_KVM_ACCEL ACCEL_CLASS_NAME("kvm")
Signature · 1 line
1.8.3.1
Am 10.10.2014 12:23, schrieb Paolo Bonzini:
Quoted 1 line
As usual, SLES11's GCC complained about double typedefs:
RHEL 6.5 gcc 4.4.7 complains as well. :-)
This fix helps there as well.
Quoted 33 lines
/home/cohuck/git/qemu/kvm-all.c:110: error: redefinition of typedef ‘KVMState’/home/cohuck/git/qemu/include/sysemu/kvm.h:161: error: previous declaration of ‘KVMState’ was hereReported-by Cornelia Huck <[email protected]>Tested-by Cornelia Huck <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- kvm-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kvm-all.c +2
-2@@ -71,7 +71,7 @@ typedef struct KVMSlottypedef struct kvm_dirty_log KVMDirtyLog ; -typedef struct KVMState +struct KVMState {AccelState parent_obj;@@ -107,7 +107,7 @@ typedef struct KVMState QTAILQ_HEAD(msi_hashtab, KVMMSIRoute) msi_hashtab[KVM_MSI_HASHTAB_SIZE];bool direct_msi;#endif -} KVMState; +};#define TYPE_KVM_ACCEL ACCEL_CLASS_NAME("kvm")
Peter Maydell
AppliedQuoted 8 lines · Paolo Bonzini
As usual, SLES11's GCC complained about double typedefs:
/home/cohuck/git/qemu/kvm-all.c:110: error: redefinition of typedef ‘KVMState’/home/cohuck/git/qemu/include/sysemu/kvm.h:161: error: previous declaration of ‘KVMState’ was hereReported-by Cornelia Huck <[email protected]>Tested-by Cornelia Huck <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>
Applied to master, thanks.
-- PMM