From 147487afe63c1719193b57674a24e12d599f2b1f Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 3 Nov 2011 16:08:58 -0700 Subject: [PATCH] UNIX: Error map ENOTSOCK --- src/unix/error.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/unix/error.c b/src/unix/error.c index e7d7c1ff..78cc09be 100644 --- a/src/unix/error.c +++ b/src/unix/error.c @@ -59,6 +59,7 @@ void uv_fatal_error(const int errorno, const char* syscall) { static int uv__translate_lib_error(int code) { switch (code) { case UV_ENOSYS: return ENOSYS; + case UV_ENOTSOCK: return ENOTSOCK; case UV_ENOENT: return ENOENT; case UV_EACCESS: return EACCES; case UV_EAFNOSUPPORT: return EAFNOSUPPORT; @@ -89,6 +90,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) { switch (sys_errno) { case 0: return UV_OK; case ENOSYS: return UV_ENOSYS; + case ENOTSOCK: return UV_ENOTSOCK; case ENOENT: return UV_ENOENT; case EACCES: return UV_EACCESS; case EAFNOSUPPORT: return UV_EAFNOSUPPORT;