From 0f81fbe5da664348a8d92e7d5cc3af9fe21d7c29 Mon Sep 17 00:00:00 2001 From: Kim Vandry Date: Sun, 10 Nov 2013 12:08:57 -0500 Subject: ares: Fixed compilation under Visual Studio 2012 --- lib/asyn-ares.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 0ef36cbbe..94ee76735 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -645,10 +645,10 @@ CURLcode Curl_set_dns_local_ip4(struct SessionHandle *data, const char *local_ip4) { #if (ARES_VERSION >= 0x010704) - uint32_t a4; + struct in_addr a4; if((!local_ip4) || (local_ip4[0] == 0)) { - a4 = 0; /* disabled: do not bind to a specific address */ + a4.s_addr = 0; /* disabled: do not bind to a specific address */ } else { if(Curl_inet_pton(AF_INET, local_ip4, &a4) != 1) { @@ -656,7 +656,7 @@ CURLcode Curl_set_dns_local_ip4(struct SessionHandle *data, } } - ares_set_local_ip4((ares_channel)data->state.resolver, ntohl(a4)); + ares_set_local_ip4((ares_channel)data->state.resolver, ntohl(a4.s_addr)); return CURLE_OK; #else /* c-ares version too old! */ -- cgit v1.2.3