Fix build of portallocator on mingw

IN6ADDR_ANY_INIT does not seem to be working as expected on MinGW:
error: missing braces around initializer [-Werror=missing-braces]
         .sin6_addr = IN6ADDR_ANY_INIT,

Use the in6addr_any variable instead.

Reported by Daniel P. Berrange.
This commit is contained in:
Ján Tomko 2014-02-20 10:04:30 +01:00
parent 83c404ff9b
commit 057d26b2ac

View File

@ -106,7 +106,7 @@ static int virPortAllocatorBindToPort(bool *used,
struct sockaddr_in6 addr6 = {
.sin6_family = AF_INET6,
.sin6_port = htons(port),
.sin6_addr = IN6ADDR_ANY_INIT,
.sin6_addr = in6addr_any
};
struct sockaddr_in addr4 = {
.sin_family = AF_INET,