Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

unix: add getaddrinfo compatibility hack

Revisit in the future. This is not a good hack.
  • Loading branch information...
bnoordhuis committed Oct 30, 2011
1 parent 84bc186 commit 70381cef9bcb7c306bf5204b7da9acdcf14ec74c
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/unix/core.c
@@ -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;
}

0 comments on commit 70381ce

Please sign in to comment.
You can’t perform that action at this time.