diff --git a/libc/dns/gethnamaddr.c b/libc/dns/gethnamaddr.c
index 63a6a60d3e218f4f7d6bbe1ba5cac7cd6844a302..8f5800a434460f70a0d14965eb6b371c16613eb9 100644 (file)
--- a/libc/dns/gethnamaddr.c
+++ b/libc/dns/gethnamaddr.c
free(buf);
__res_put_state(res);
if (hp == NULL)
free(buf);
__res_put_state(res);
if (hp == NULL)
- switch (h_errno) {
+ switch (*info->he) {
case HOST_NOT_FOUND:
return NS_NOTFOUND;
case TRY_AGAIN:
case HOST_NOT_FOUND:
return NS_NOTFOUND;
case TRY_AGAIN:
*info->he = NETDB_SUCCESS;
return NS_SUCCESS;
nospc:
*info->he = NETDB_SUCCESS;
return NS_SUCCESS;
nospc:
+ errno = ENOSPC;
*info->he = NETDB_INTERNAL;
return NS_UNAVAIL;
}
*info->he = NETDB_INTERNAL;
return NS_UNAVAIL;
}