From 4a023fc0786780d254e1e4a34a983c36f59d99bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 24 Feb 2014 09:19:12 +0100 Subject: [PATCH] unix, windows: map ENOPROTOOPT errno Fixes #1143 --- 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 f5ef8470..19e2267b 100644 --- a/include/uv-errno.h +++ b/include/uv-errno.h @@ -376,4 +376,10 @@ # define UV__EFBIG (-4036) #endif +#if defined(ENOPROTOOPT) && !defined(_WIN32) +# define UV__ENOPROTOOPT (-ENOPROTOOPT) +#else +# define UV__ENOPROTOOPT (-4035) +#endif + #endif /* UV_ERRNO_H_ */ diff --git a/include/uv.h b/include/uv.h index c8536c23..c99e5fac 100644 --- a/include/uv.h +++ b/include/uv.h @@ -114,6 +114,7 @@ extern "C" { XX(ENOENT, "no such file or directory") \ XX(ENOMEM, "not enough memory") \ XX(ENONET, "machine is not on the network") \ + XX(ENOPROTOOPT, "protocol not available") \ XX(ENOSPC, "no space left on device") \ XX(ENOSYS, "function not implemented") \ XX(ENOTCONN, "socket is not connected") \