From fe3fbd63e5dfe26c473cdd422ad216a14ae2d7e4 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 9 May 2018 01:10:58 -0400 Subject: [PATCH] unix,windows: map EFTYPE errno Refs: https://github.com/nodejs/node/pull/20588 PR-URL: https://github.com/libuv/libuv/pull/1836 Reviewed-By: Ben Noordhuis --- include/uv-errno.h | 6 ++++++ include/uv.h | 1 + 2 files changed, 7 insertions(+) diff --git a/include/uv-errno.h b/include/uv-errno.h index aa4d4509f60..8eeb95de31b 100644 --- a/include/uv-errno.h +++ b/include/uv-errno.h @@ -433,5 +433,11 @@ # define UV__ENOTTY (-4029) #endif +#if defined(EFTYPE) && !defined(_WIN32) +# define UV__EFTYPE UV__ERR(EFTYPE) +#else +# define UV__EFTYPE (-4028) +#endif + #endif /* UV_ERRNO_H_ */ diff --git a/include/uv.h b/include/uv.h index 41fad45108b..5ac01d5912c 100644 --- a/include/uv.h +++ b/include/uv.h @@ -142,6 +142,7 @@ extern "C" { XX(EHOSTDOWN, "host is down") \ XX(EREMOTEIO, "remote I/O error") \ XX(ENOTTY, "inappropriate ioctl for device") \ + XX(EFTYPE, "inappropriate file type or format") \ #define UV_HANDLE_TYPE_MAP(XX) \ XX(ASYNC, async) \