Re: [libvirt] [PATCH v2] Fix cast errors with clang

2014-10-22 Thread Roman Bogorodskiy
Eric Blake wrote: > On 10/21/2014 08:22 AM, Roman Bogorodskiy wrote: > > Build with clang fails with: > > > > CC util/libvirt_util_la-virsocketaddr.lo > > util/virsocketaddr.c:904:17: error: cast from 'struct sockaddr *' to > > 'struct sockaddr_in *' increases required alignment from 1

Re: [libvirt] [PATCH v2] Fix cast errors with clang

2014-10-21 Thread Eric Blake
On 10/21/2014 08:22 AM, Roman Bogorodskiy wrote: > Build with clang fails with: > > CC util/libvirt_util_la-virsocketaddr.lo > util/virsocketaddr.c:904:17: error: cast from 'struct sockaddr *' to > 'struct sockaddr_in *' increases required alignment from 1 to 4 > [-Werror,-Wcast-align] >

[libvirt] [PATCH v2] Fix cast errors with clang

2014-10-21 Thread Roman Bogorodskiy
Build with clang fails with: CC util/libvirt_util_la-virsocketaddr.lo util/virsocketaddr.c:904:17: error: cast from 'struct sockaddr *' to 'struct sockaddr_in *' increases required alignment from 1 to 4 [-Werror,-Wcast-align] inet4 = (struct sockaddr_in*) res->ai_addr;