aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-03-06 01:23:09 +0000
committerYang Tse <yangsita@gmail.com>2010-03-06 01:23:09 +0000
commit2e9eb1a2ac8ec3953d8dba75248a3bab0e352b10 (patch)
tree0ef2203902687db42205da238d995bb3ef78b857
parentf5d8c0befc61497b3d3572ae51e779b396589660 (diff)
removed usage of 's6_addr', fixing compilation issue triggered with no
longer using 'in6_addr' but only our 'ares_in6_addr' struct
-rw-r--r--ares/ares_gethostbyaddr.c2
-rw-r--r--ares/ares_gethostbyname.c4
-rw-r--r--ares/ares_ipv6.h4
3 files changed, 4 insertions, 6 deletions
diff --git a/ares/ares_gethostbyaddr.c b/ares/ares_gethostbyaddr.c
index 4b1dad36d..a2c3a9076 100644
--- a/ares/ares_gethostbyaddr.c
+++ b/ares/ares_gethostbyaddr.c
@@ -272,7 +272,7 @@ static void ptr_rr_name(char *name, const struct ares_addr *addr)
}
else
{
- unsigned char *bytes = (unsigned char *)&addr->addrV6.s6_addr;
+ unsigned char *bytes = (unsigned char *)&addr->addrV6;
/* There are too many arguments to do this in one line using
* minimally C89-compliant compilers */
sprintf(name,
diff --git a/ares/ares_gethostbyname.c b/ares/ares_gethostbyname.c
index bf88309c1..ebad67075 100644
--- a/ares/ares_gethostbyname.c
+++ b/ares/ares_gethostbyname.c
@@ -504,7 +504,9 @@ static int get6_address_index(const struct ares_in6_addr *addr,
{
if (sortlist[i].family != AF_INET6)
continue;
- if (!ares_bitncmp(&addr->s6_addr, &sortlist[i].addrV6.s6_addr, sortlist[i].mask.bits))
+ if (!ares_bitncmp(addr,
+ &sortlist[i].addrV6,
+ sortlist[i].mask.bits))
break;
}
return i;
diff --git a/ares/ares_ipv6.h b/ares/ares_ipv6.h
index 5bb7b8cf7..4a97199c3 100644
--- a/ares/ares_ipv6.h
+++ b/ares/ares_ipv6.h
@@ -22,10 +22,6 @@
#define PF_INET6 AF_INET6
#endif
-#if !defined(HAVE_STRUCT_IN6_ADDR) && !defined(s6_addr)
-#define s6_addr _S6_un._S6_u8
-#endif
-
#ifndef HAVE_STRUCT_SOCKADDR_IN6
struct sockaddr_in6
{