Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-19 Thread Programmingkid
On Jan 18, 2016, at 8:23 PM, Programmingkid wrote: > > On Jan 18, 2016, at 5:09 PM, Peter Maydell wrote: > >> On 18 January 2016 at 21:09, Programmingkid >> wrote: >>> >>> On Jan 18, 2016, at 3:49 PM, Peter Maydell wrote: Can you say what 'gcc --version' prints for you? That will t

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-19 Thread Daniel P. Berrange
On Mon, Jan 18, 2016 at 09:36:08AM -0500, Programmingkid wrote: > > On Jan 18, 2016, at 4:58 AM, Daniel P. Berrange wrote: > > > On Sun, Jan 17, 2016 at 05:23:44PM -0500, Programmingkid wrote: > >> I was wondering if you had problems compiling QEMU on Mac OS X recently. > >> On my system, the ch

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-18 Thread Programmingkid
On Jan 18, 2016, at 5:09 PM, Peter Maydell wrote: > On 18 January 2016 at 21:09, Programmingkid wrote: >> >> On Jan 18, 2016, at 3:49 PM, Peter Maydell wrote: >>> Can you say what 'gcc --version' prints for you? That will >>> tell us the clang version number, which is more interesting >>> than

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-18 Thread Peter Maydell
On 18 January 2016 at 21:09, Programmingkid wrote: > > On Jan 18, 2016, at 3:49 PM, Peter Maydell wrote: >> Can you say what 'gcc --version' prints for you? That will >> tell us the clang version number, which is more interesting >> than what clang claims its gcc-compatibility is. > > $ gcc-4.9 --

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-18 Thread Programmingkid
On Jan 18, 2016, at 3:49 PM, Peter Maydell wrote: > On 18 January 2016 at 19:50, Programmingkid wrote: >> I tried what Peter Maydell did and here are the results: >> >> typedef __darwin_size_t size_t; >> >> char control[(((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(struct >> cmsghdr))

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-18 Thread Peter Maydell
On 18 January 2016 at 19:50, Programmingkid wrote: > I tried what Peter Maydell did and here are the results: > > typedef __darwin_size_t size_t; > > char control[(((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(struct > cmsghdr)) + (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)) + >

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-18 Thread Programmingkid
On Jan 18, 2016, at 12:45 PM, Eric Blake wrote: > On 01/17/2016 04:45 PM, Programmingkid wrote: >>> What's the definition of the CMSG_SPACE macro under OS X? >>> >>> Paolo >> >> #define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct >> cmsghdr)) + __DARWIN_ALIGN32(l)) > > And th

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-18 Thread Programmingkid
On Jan 18, 2016, at 12:59 PM, Peter Maydell wrote: > On 18 January 2016 at 17:45, Eric Blake wrote: >> On 01/17/2016 04:45 PM, Programmingkid wrote: What's the definition of the CMSG_SPACE macro under OS X? Paolo >>> >>> #define CMSG_SPACE(l) (__DARWIN_ALIGN32(si

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-18 Thread Peter Maydell
On 18 January 2016 at 17:45, Eric Blake wrote: > On 01/17/2016 04:45 PM, Programmingkid wrote: >>> What's the definition of the CMSG_SPACE macro under OS X? >>> >>> Paolo >> >> #define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct >> cmsghdr)) + __DARWIN_ALIGN32(l)) > > And the de

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-18 Thread Eric Blake
On 01/17/2016 04:45 PM, Programmingkid wrote: >> What's the definition of the CMSG_SPACE macro under OS X? >> >> Paolo > > #define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct > cmsghdr)) + __DARWIN_ALIGN32(l)) And the definition of __DARWIN_ALIGN32()? It looks like the definit

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-18 Thread Programmingkid
On Jan 18, 2016, at 4:58 AM, Daniel P. Berrange wrote: > On Sun, Jan 17, 2016 at 05:23:44PM -0500, Programmingkid wrote: >> I was wondering if you had problems compiling QEMU on Mac OS X recently. On >> my system, the channel-socket.c file causes this error: >> >> io/channel-socket.c: In functi

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-18 Thread Daniel P. Berrange
On Sun, Jan 17, 2016 at 05:23:44PM -0500, Programmingkid wrote: > I was wondering if you had problems compiling QEMU on Mac OS X recently. On > my system, the channel-socket.c file causes this error: > > io/channel-socket.c: In function 'qio_channel_socket_writev': > io/channel-socket.c:497:18: e

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-17 Thread Programmingkid
On Jan 17, 2016, at 6:22 PM, Paolo Bonzini wrote: > > > 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

Re: [Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-17 Thread Paolo Bonzini
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*)’:

[Qemu-devel] CMSG_SPACE() causing compile time error on Mac OS X

2016-01-17 Thread Programmingkid
I was wondering if you had problems compiling QEMU on Mac OS X recently. On my system, the channel-socket.c file causes this error: io/channel-socket.c: In function 'qio_channel_socket_writev': io/channel-socket.c:497:18: error: variable-sized object may not be initialized char control[CMSG_