Received: from eggs.gnu.org ([2001:4830:134:3::10]:59081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKx0b-0006eP-Vk for qemu-devel@nongnu.org; Sun, 17 Jan 2016 18:45:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKx0Y-0005ma-Pe for qemu-devel@nongnu.org; Sun, 17 Jan 2016 18:45:21 -0500 Received: from mail-ig0-x230.google.com ([2607:f8b0:4001:c05::230]:35637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKx0Y-0005mW-KJ for qemu-devel@nongnu.org; Sun, 17 Jan 2016 18:45:18 -0500 Received: by mail-ig0-x230.google.com with SMTP id t15so44889505igr.0 for ; Sun, 17 Jan 2016 15:45:18 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=windows-1252 From: Programmingkid In-Reply-To: <569C224B.2040102@redhat.com> Date: Sun, 17 Jan 2016 18:45:15 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <1866CB23-7966-4F68-8925-2C3888753883@gmail.com> References: <5525054B-A7E2-4538-9F68-9E606B85B1B7@gmail.com> <569C224B.2040102@redhat.com> Subject: Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , qemu-devel qemu-devel On Jan 17, 2016, at 6:22 PM, Paolo Bonzini wrote: >=20 >=20 > On 17/01/2016 23:23, Programmingkid wrote: >> When compiling under Xcode, the program does compile and run. It = prints "GCC version =3D 4.2.1". >>=20 >> When I try to compile it under gcc 4.2.1 using just the terminal, I = see this error message: >> main.cpp: In function =91int main(int, char* const*)=92: >> main.cpp:6: error: size of array =91control=92 is not an integral = constant-expression >>=20 >> Why there is a difference between XCode and the terminal I have no = idea.=20 >>=20 >> When compiling it under gcc 4.9.2, it compiles and runs without = problem.=20 >>=20 >> I have set the configure option for cc to gcc-4.9 with this = "-cc=3Dgcc-4.9". So the error message makes me believe that the wrong = compiler is being used.=20 >>=20 >> This is the full configure command options I used: >> ./configure --cxx=3Dgcc-4.9 --cc=3Dgcc-4.9 --objcc=3Dgcc-4.9 = --disable-gtk --disable-sdl --target-list=3Dppc-softmmu,i386-softmmu >>=20 >> Any insight as to what could be wrong?=20 >=20 > What's the definition of the CMSG_SPACE macro under OS X? >=20 > Paolo #define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct = cmsghdr)) + __DARWIN_ALIGN32(l)) Hope this helps.=20=