diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/asyn-ares.c | 6 |
1 files 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! */ |