From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKwf1-0003yy-90 for qemu-devel@nongnu.org; Sun, 17 Jan 2016 18:23:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKwex-0001W6-8o for qemu-devel@nongnu.org; Sun, 17 Jan 2016 18:23:03 -0500 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:36751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKwex-0001Vz-1A for qemu-devel@nongnu.org; Sun, 17 Jan 2016 18:22:59 -0500 Received: by mail-wm0-x22a.google.com with SMTP id l65so79671389wmf.1 for ; Sun, 17 Jan 2016 15:22:58 -0800 (PST) Sender: Paolo Bonzini References: <5525054B-A7E2-4538-9F68-9E606B85B1B7@gmail.com> From: Paolo Bonzini Message-ID: <569C224B.2040102@redhat.com> Date: Mon, 18 Jan 2016 00:22:51 +0100 MIME-Version: 1.0 In-Reply-To: <5525054B-A7E2-4538-9F68-9E606B85B1B7@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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: Programmingkid , Peter Maydell Cc: qemu-devel qemu-devel On 17/01/2016 23:23, Programmingkid wrote: > When compiling under Xcode, the program does compile and run. It prints "GCC version = 4.2.1". > > When I try to compile it under gcc 4.2.1 using just the terminal, I see this error message: > main.cpp: In function ‘int main(int, char* const*)’: > main.cpp:6: error: size of array ‘control’ is not an integral constant-expression > > Why there is a difference between XCode and the terminal I have no idea. > > When compiling it under gcc 4.9.2, it compiles and runs without problem. > > I have set the configure option for cc to gcc-4.9 with this "-cc=gcc-4.9". So the error message makes me believe that the wrong compiler is being used. > > This is the full configure command options I used: > ./configure --cxx=gcc-4.9 --cc=gcc-4.9 --objcc=gcc-4.9 --disable-gtk --disable-sdl --target-list=ppc-softmmu,i386-softmmu > > Any insight as to what could be wrong? What's the definition of the CMSG_SPACE macro under OS X? Paolo