From: "Daniel P. Berrange" <berrange(a)redhat.com>
The 'in_addr_t' typedef is not present in Mingw64 headers.
Instead we can use the more portable 'struct in_addr' and
then access its 's_addr' field.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/util/virsocketaddr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c
index 2666574..80b5c0b 100644
--- a/src/util/virsocketaddr.c
+++ b/src/util/virsocketaddr.c
@@ -235,10 +235,10 @@ virSocketAddrIsPrivate(const virSocketAddrPtr addr)
bool
virSocketAddrIsWildcard(const virSocketAddrPtr addr)
{
- in_addr_t tmp = INADDR_ANY;
+ struct in_addr tmp = { .s_addr = INADDR_ANY };
switch (addr->data.stor.ss_family) {
case AF_INET:
- return memcmp(&addr->data.inet4.sin_addr.s_addr, &tmp,
+ return memcmp(&addr->data.inet4.sin_addr.s_addr, &tmp.s_addr,
sizeof(addr->data.inet4.sin_addr.s_addr)) == 0;
case AF_INET6:
return IN6_IS_ADDR_UNSPECIFIED(&addr->data.inet6.sin6_addr);
--
1.8.2.1