diff options
-rw-r--r-- | lib/curl_addrinfo.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c index 7fb816f3a..6feccf2d0 100644 --- a/lib/curl_addrinfo.c +++ b/lib/curl_addrinfo.c @@ -208,6 +208,18 @@ Curl_getaddrinfo_ex(const char *nodename, Curl_freeaddrinfo(cafirst); cafirst = NULL; } + else if(!cafirst) { +#ifdef EAI_NONAME + /* rfc3493 conformant */ + error = EAI_NONAME; +#else + /* rfc3493 obsoleted */ + error = EAI_NODATA; +#endif +#ifdef USE_WINSOCK + SET_SOCKERRNO(error); +#endif + } *result = cafirst; |