[glib] Fix ginetaddress.c compile on Solaris
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Subject: [glib] Fix ginetaddress.c compile on Solaris
- Date: Sun, 26 Apr 2009 13:22:49 -0400 (EDT)
commit 9a15da50e4d10794c35e4b638b7ab521be671a6e
Author: Dan Winship <danw gnome org>
Date: Sun Apr 26 09:59:28 2009 -0400
Fix ginetaddress.c compile on Solaris
In glibc, IN6_IS_ADDR_UNSPECIFIED() et al. cast their argument to a
uint32_t*, so it doesn't matter whether you pass them the in6_addr
itself (which is what you're supposed to do) or one of its union
members (which is what we were actually doing). Solaris's macro
accesses the in6_addr fields directly though, and so only works if you
pass the actual in6_addr. #580194.
---
gio/ginetaddress.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/gio/ginetaddress.c b/gio/ginetaddress.c
index d33382a..1af9916 100644
--- a/gio/ginetaddress.c
+++ b/gio/ginetaddress.c
@@ -530,7 +530,7 @@ g_inet_address_get_is_any (GInetAddress *address)
return addr4 == INADDR_ANY;
}
else
- return IN6_IS_ADDR_UNSPECIFIED (&address->priv->addr.ipv6.s6_addr);
+ return IN6_IS_ADDR_UNSPECIFIED (&address->priv->addr.ipv6);
}
/**
@@ -556,7 +556,7 @@ g_inet_address_get_is_loopback (GInetAddress *address)
return ((addr4 & 0xff000000) == 0x7f000000);
}
else
- return IN6_IS_ADDR_LOOPBACK (&address->priv->addr.ipv6.s6_addr);
+ return IN6_IS_ADDR_LOOPBACK (&address->priv->addr.ipv6);
}
/**
@@ -584,7 +584,7 @@ g_inet_address_get_is_link_local (GInetAddress *address)
return ((addr4 & 0xffff0000) == 0xa9fe0000);
}
else
- return IN6_IS_ADDR_LINKLOCAL (&address->priv->addr.ipv6.s6_addr);
+ return IN6_IS_ADDR_LINKLOCAL (&address->priv->addr.ipv6);
}
/**
@@ -615,7 +615,7 @@ g_inet_address_get_is_site_local (GInetAddress *address)
(addr4 & 0xffff0000) == 0xc0a80000);
}
else
- return IN6_IS_ADDR_SITELOCAL (&address->priv->addr.ipv6.s6_addr);
+ return IN6_IS_ADDR_SITELOCAL (&address->priv->addr.ipv6);
}
/**
@@ -640,7 +640,7 @@ g_inet_address_get_is_multicast (GInetAddress *address)
return IN_MULTICAST (addr4);
}
else
- return IN6_IS_ADDR_MULTICAST (&address->priv->addr.ipv6.s6_addr);
+ return IN6_IS_ADDR_MULTICAST (&address->priv->addr.ipv6);
}
/**
@@ -661,7 +661,7 @@ g_inet_address_get_is_mc_global (GInetAddress *address)
if (address->priv->family == AF_INET)
return FALSE;
else
- return IN6_IS_ADDR_MC_GLOBAL (&address->priv->addr.ipv6.s6_addr);
+ return IN6_IS_ADDR_MC_GLOBAL (&address->priv->addr.ipv6);
}
/**
@@ -682,7 +682,7 @@ g_inet_address_get_is_mc_link_local (GInetAddress *address)
if (address->priv->family == AF_INET)
return FALSE;
else
- return IN6_IS_ADDR_MC_LINKLOCAL (&address->priv->addr.ipv6.s6_addr);
+ return IN6_IS_ADDR_MC_LINKLOCAL (&address->priv->addr.ipv6);
}
/**
@@ -703,7 +703,7 @@ g_inet_address_get_is_mc_node_local (GInetAddress *address)
if (address->priv->family == AF_INET)
return FALSE;
else
- return IN6_IS_ADDR_MC_NODELOCAL (&address->priv->addr.ipv6.s6_addr);
+ return IN6_IS_ADDR_MC_NODELOCAL (&address->priv->addr.ipv6);
}
/**
@@ -724,7 +724,7 @@ g_inet_address_get_is_mc_org_local (GInetAddress *address)
if (address->priv->family == AF_INET)
return FALSE;
else
- return IN6_IS_ADDR_MC_ORGLOCAL (&address->priv->addr.ipv6.s6_addr);
+ return IN6_IS_ADDR_MC_ORGLOCAL (&address->priv->addr.ipv6);
}
/**
@@ -745,7 +745,7 @@ g_inet_address_get_is_mc_site_local (GInetAddress *address)
if (address->priv->family == AF_INET)
return FALSE;
else
- return IN6_IS_ADDR_MC_SITELOCAL (&address->priv->addr.ipv6.s6_addr);
+ return IN6_IS_ADDR_MC_SITELOCAL (&address->priv->addr.ipv6);
}
#define __G_INET_ADDRESS_C__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]