From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Fix to issues with kvm.h and g++ Date: Thu, 06 Nov 2008 17:57:54 +0200 Message-ID: <49131402.3000003@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: KVM List To: =?ISO-8859-1?Q?Daniel_God=E1s?= Return-path: Received: from mx2.redhat.com ([66.187.237.31]:58704 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750926AbYKFP57 (ORCPT ); Thu, 6 Nov 2008 10:57:59 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Daniel God=E1s wrote: > Hello, > > I am writing a kvm-based emulation framework in c++. When I included > I got the following errors: > > /usr/include/linux/kvm.h:89: error: 'struct kvm_run:: union>::kvm_io' invalid; an anonymous union can only have non-static > data members > /usr/include/linux/kvm.h:230: error: declaration of '__u64 > kvm_dirty_log::::padding' > /usr/include/linux/kvm.h:227: error: conflicts with previous > declaration '__u32 kvm_dirty_log::padding' > /usr/include/linux/kvm.h:89: error: 'struct kvm_run:: union>::kvm_io' invalid; an anonymous union can only have non-static > data members > /usr/include/linux/kvm.h:230: error: declaration of '__u64 > kvm_dirty_log::::padding' > /usr/include/linux/kvm.h:227: error: conflicts with previous > declaration '__u32 kvm_dirty_log::padding' > > It looks like nobody uses struct kvm_io nor in kernel or user space. > =20 Please move it outside the outer structure, just in case. > The same happens with the two padding fields. The following patch > fixes the errors: > > =20 And resend with a signoff and changelog entry. --=20 error compiling committee.c: too many arguments to function