From 77a2477c3f071d36981a214a1fe4b24edeee295f Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sun, 25 Sep 2011 18:09:35 +0200 Subject: [PATCH] unix: add EAI_NODATA #ifdef guard, freebsd doesn't have it --- src/unix/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unix/core.c b/src/unix/core.c index 461d26fc..a63a6a47 100644 --- a/src/unix/core.c +++ b/src/unix/core.c @@ -599,7 +599,11 @@ static int uv_getaddrinfo_done(eio_req* req) { if (handle->retcode == 0) { /* OK */ +#if EAI_NODATA /* FreeBSD deprecated EAI_NODATA */ } else if (handle->retcode == EAI_NONAME || handle->retcode == EAI_NODATA) { +#else + } else if (handle->retcode == EAI_NONAME) { +#endif uv__set_sys_error(handle->loop, ENOENT); /* FIXME compatibility hack */ } else { handle->loop->last_err.code = UV_EADDRINFO;