From: nathan binkert Subject: [PATCH] KVM: Make kvm header compile under g++. Date: Fri, 27 Mar 2009 21:53:05 -0700 Message-ID: <217accd40903272153m650b0f1ata7bc899eb4b92be0@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from rv-out-0506.google.com ([209.85.198.234]:64563 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424AbZC1ExI (ORCPT ); Sat, 28 Mar 2009 00:53:08 -0400 Received: by rv-out-0506.google.com with SMTP id g37so280726rvb.5 for ; Fri, 27 Mar 2009 21:53:05 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: Two things needed fixing: 1) g++ does not allow a named structure type within an anonymous union and 2) Avoid name clash between two padding fields within the same struct by giving them different names as is done elsewhere in the header. Signed-off-by: Nathan Binkert --- include/linux/kvm.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/kvm.h b/include/linux/kvm.h index ee755e2..2e3a734 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -119,7 +119,7 @@ struct kvm_run { __u32 error_code; } ex; /* KVM_EXIT_IO */ - struct kvm_io { + struct { #define KVM_EXIT_IO_IN 0 #define KVM_EXIT_IO_OUT 1 __u8 direction; @@ -224,10 +224,10 @@ struct kvm_interrupt { /* for KVM_GET_DIRTY_LOG */ struct kvm_dirty_log { __u32 slot; - __u32 padding; + __u32 padding1; union { void __user *dirty_bitmap; /* one bit per page */ - __u64 padding; + __u64 padding2; }; }; -- 1.6.1.2