Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: add getaddrinfo compatibility hack
Browse files Browse the repository at this point in the history
Revisit in the future. This is not a good hack.
  • Loading branch information
bnoordhuis committed Oct 30, 2011
1 parent 84bc186 commit 70381ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/unix/core.c
Expand Up @@ -597,7 +597,11 @@ static int uv_getaddrinfo_done(eio_req* req) {
free(handle->service);
free(handle->hostname);

if (handle->retcode != 0) {
if (handle->retcode == 0) {
/* OK */
} else if (handle->retcode == EAI_NONAME || handle->retcode == EAI_NODATA) {
uv__set_sys_error(handle->loop, ENOENT); /* FIXME compatibility hack */
} else {
handle->loop->last_err.code = UV_EADDRINFO;
handle->loop->last_err.sys_errno_ = handle->retcode;
}
Expand Down

0 comments on commit 70381ce

Please sign in to comment.