Re: [Qemu-devel] [PATCH] io: fix build on FreeBSD

2016-02-26 Thread Ed Maste
On 25 February 2016 at 11:41, Daniel P. Berrange wrote: > On Thu, Feb 25, 2016 at 09:37:18AM -0700, Eric Blake wrote: >> >> Oh, right. That's annoying. What about: >> >> #ifndef EAI_ADDRFAMILY >> #define EAI_ADDRFAMILY 0 >> #endif >> >> if ((EAI_ADDRFAMILY && gaierr ==

Re: [Qemu-devel] [PATCH] io: fix build on FreeBSD

2016-02-25 Thread Eric Blake
On 02/25/2016 09:32 AM, Daniel P. Berrange wrote: >>> +if ( >>> +#ifdef EAI_ADDRFAMILY >>> +gaierr == EAI_ADDRFAMILY || >>> +#endif >>> gaierr == EAI_FAMILY || >> >> I'm not the biggest-fan of mid-expression #ifdefs. Can we rewrite this >> to look more like: >> >>

Re: [Qemu-devel] [PATCH] io: fix build on FreeBSD

2016-02-25 Thread Daniel P. Berrange
On Thu, Feb 25, 2016 at 09:37:18AM -0700, Eric Blake wrote: > On 02/25/2016 09:32 AM, Daniel P. Berrange wrote: > > >>> +if ( > >>> +#ifdef EAI_ADDRFAMILY > >>> +gaierr == EAI_ADDRFAMILY || > >>> +#endif > >>> gaierr == EAI_FAMILY || > >> > >> I'm not the

Re: [Qemu-devel] [PATCH] io: fix build on FreeBSD

2016-02-25 Thread Daniel P. Berrange
On Thu, Feb 25, 2016 at 09:29:02AM -0700, Eric Blake wrote: > On 02/25/2016 08:31 AM, Ed Maste wrote: > > EAI_ADDRFAMILY is obsolete and FreeBSD/s netdb.h does not provide a > > definition. > > > > Signed-off-by: Ed Maste > > --- > > tests/test-io-channel-socket.c | 5 -

Re: [Qemu-devel] [PATCH] io: fix build on FreeBSD

2016-02-25 Thread Eric Blake
On 02/25/2016 08:31 AM, Ed Maste wrote: > EAI_ADDRFAMILY is obsolete and FreeBSD/s netdb.h does not provide a > definition. > > Signed-off-by: Ed Maste > --- > tests/test-io-channel-socket.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git

[Qemu-devel] [PATCH] io: fix build on FreeBSD

2016-02-25 Thread Ed Maste
EAI_ADDRFAMILY is obsolete and FreeBSD/s netdb.h does not provide a definition. Signed-off-by: Ed Maste --- tests/test-io-channel-socket.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c

Re: [Qemu-devel] [PATCH] io: fix build on FreeBSD

2016-02-25 Thread Daniel P. Berrange
On Thu, Feb 25, 2016 at 10:31:32AM -0500, Ed Maste wrote: > EAI_ADDRFAMILY is obsolete and FreeBSD/s netdb.h does not provide a > definition. > > Signed-off-by: Ed Maste > --- > tests/test-io-channel-socket.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-)