diff --git a/include/uv.h b/include/uv.h index 69e0db2f..dbea113a 100644 --- a/include/uv.h +++ b/include/uv.h @@ -126,7 +126,8 @@ extern "C" { XX( 53, ENOTEMPTY, "directory not empty") \ XX( 54, ENOSPC, "no space left on device") \ XX( 55, EIO, "i/o error") \ - XX( 56, EROFS, "read-only file system" ) + XX( 56, EROFS, "read-only file system" ) \ + XX( 57, ENODEV, "no such device" ) #define UV_ERRNO_GEN(val, name, s) UV_##name = val, diff --git a/src/unix/error.c b/src/unix/error.c index c2651a3a..9fbb312e 100644 --- a/src/unix/error.c +++ b/src/unix/error.c @@ -86,6 +86,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case EADDRNOTAVAIL: return UV_EADDRNOTAVAIL; case ENOTDIR: return UV_ENOTDIR; case EISDIR: return UV_EISDIR; + case ENODEV: return UV_ENODEV; case ENOTCONN: return UV_ENOTCONN; case EEXIST: return UV_EEXIST; case EHOSTUNREACH: return UV_EHOSTUNREACH;