summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2010-07-29 08:24:59 -0700
committerBen Greear <greearb@candelatech.com>2010-07-29 22:31:56 -0700
commit3e33e2c2ba612d19cf7c1f77c8953b012489e801 (patch)
tree775f1cf48eeab96339296ec8553bb2505500121d
parent28ff9336d5c8993e197502d68c45c5b7f4fe83d6 (diff)
downloadc-ares-3e33e2c2ba612d19cf7c1f77c8953b012489e801.tar.gz
c-ares-3e33e2c2ba612d19cf7c1f77c8953b012489e801.tar.bz2
c-ares-3e33e2c2ba612d19cf7c1f77c8953b012489e801.zip
ipv6: Fix some build issues related to the local-bind feature.
Signed-off-by: Ben Greear <greearb@candelatech.com>
-rw-r--r--ares_ipv6.h4
-rw-r--r--ares_options.c5
-rw-r--r--ares_process.c2
-rw-r--r--inet_net_pton.c4
4 files changed, 10 insertions, 5 deletions
diff --git a/ares_ipv6.h b/ares_ipv6.h
index c0365c4..6f1022a 100644
--- a/ares_ipv6.h
+++ b/ares_ipv6.h
@@ -71,4 +71,8 @@ struct addrinfo
#endif
#endif
+/* Defined in ares_net_pton.c for no particular reason. */
+extern const struct ares_in6_addr ares_in6addr_any; /* :: */
+
+
#endif /* ARES_IPV6_H */
diff --git a/ares_options.c b/ares_options.c
index bb1d5d5..1de36c4 100644
--- a/ares_options.c
+++ b/ares_options.c
@@ -131,8 +131,6 @@ int ares_set_servers(ares_channel channel,
int ares_set_servers_csv(ares_channel channel,
const char* _csv)
{
- struct ares_addr_node *srvr;
- int num_srvrs = 0;
int i;
char* csv = NULL;
char* ptr;
@@ -162,10 +160,9 @@ int ares_set_servers_csv(ares_channel channel,
csv[i+1] = 0;
}
- ptr = csv;
start_host = csv;
found_port = false;
- for (ptr; *ptr; ptr++) {
+ for (ptr = csv; *ptr; ptr++) {
if (*ptr == ',') {
char* pp = ptr - 1;
struct in_addr in4;
diff --git a/ares_process.c b/ares_process.c
index 14dce71..c3d7fa4 100644
--- a/ares_process.c
+++ b/ares_process.c
@@ -912,7 +912,7 @@ static int configure_socket(ares_socket_t s, int family, ares_channel channel)
}
}
else if (family == AF_INET6) {
- if (memcmp(channel->local_ip6, &in6addr_any, sizeof(channel->local_ip6)) != 0) {
+ if (memcmp(channel->local_ip6, &ares_in6addr_any, sizeof(channel->local_ip6)) != 0) {
struct sockaddr_in6 sa;
memset(&sa, 0, sizeof(sa));
sa.sin6_family = AF_INET6;
diff --git a/inet_net_pton.c b/inet_net_pton.c
index eabf63b..8e8a42c 100644
--- a/inet_net_pton.c
+++ b/inet_net_pton.c
@@ -46,6 +46,10 @@
#include "ares_ipv6.h"
#include "inet_net_pton.h"
+
+const struct ares_in6_addr ares_in6addr_any = { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
+
+
#if !defined(HAVE_INET_NET_PTON) || !defined(HAVE_INET_NET_PTON_IPV6)
/*