int port,
int *waitp)
{
+#if defined(HAVE_GETHOSTBYNAME_R_3) || defined(HAVE_GETHOSTBYNAME_R_6)
+ int res = ERANGE;
+#endif
Curl_addrinfo *ai = NULL;
struct hostent *h = NULL;
in_addr_t in;
*waitp = 0; /* don't wait, we act synchronously */
-#if defined(HAVE_GETHOSTBYNAME_R_3) || defined(HAVE_GETHOSTBYNAME_R_6)
- int res = ERANGE;
-#endif
-
if(1 == Curl_inet_pton(AF_INET, hostname, &in))
/* This is a dotted IP address 123.123.123.123-style */
return Curl_ip2addr(in, hostname, port);