diff --git a/include/uv.h b/include/uv.h index 7c2c03f9..49160b2b 100644 --- a/include/uv.h +++ b/include/uv.h @@ -120,8 +120,9 @@ 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( 57, ENODEV, "no such device" ) + XX( 56, EROFS, "read-only file system") \ + XX( 57, ENODEV, "no such device") \ + XX( 58, ESPIPE, "invalid seek") \ #define UV_ERRNO_GEN(val, name, s) UV_##name = val, diff --git a/src/unix/error.c b/src/unix/error.c index 9fbb312e..b2add994 100644 --- a/src/unix/error.c +++ b/src/unix/error.c @@ -68,6 +68,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case EAFNOSUPPORT: return UV_EAFNOSUPPORT; case EBADF: return UV_EBADF; case EPIPE: return UV_EPIPE; + case ESPIPE: return UV_ESPIPE; case EAGAIN: return UV_EAGAIN; #if EWOULDBLOCK != EAGAIN case EWOULDBLOCK: return UV_EAGAIN;