diff --git a/include/uv.h b/include/uv.h index ad328564..4446fd65 100644 --- a/include/uv.h +++ b/include/uv.h @@ -82,6 +82,7 @@ typedef enum { UV_ENOTSOCK, UV_ENOTSUP, UV_ENOENT, + UV_ENOSYS, UV_EPIPE, UV_EPROTO, UV_EPROTONOSUPPORT, diff --git a/src/unix/error.c b/src/unix/error.c index 5ce2156e..d5dc0e5c 100644 --- a/src/unix/error.c +++ b/src/unix/error.c @@ -58,6 +58,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_ENOENT: return ENOENT; case UV_EACCESS: return EACCES; case UV_EBADF: return EBADF; @@ -84,6 +85,7 @@ static int uv__translate_lib_error(int code) { uv_err_code uv_translate_sys_error(int sys_errno) { switch (sys_errno) { case 0: return UV_OK; + case ENOSYS: return UV_ENOSYS; case ENOENT: return UV_ENOENT; case EACCES: return UV_EACCESS; case EBADF: return UV_EBADF; diff --git a/src/uv-common.c b/src/uv-common.c index b97aac3b..79369f3a 100644 --- a/src/uv-common.c +++ b/src/uv-common.c @@ -82,6 +82,7 @@ const char* uv_err_name(uv_err_t err) { case UV_ENOTSOCK: return "ENOTSOCK"; case UV_ENOTSUP: return "ENOTSUP"; case UV_ENOENT: return "ENOENT"; + case UV_ENOSYS: return "ENOSYS"; case UV_EPIPE: return "EPIPE"; case UV_EPROTO: return "EPROTO"; case UV_EPROTONOSUPPORT: return "EPROTONOSUPPORT";