api: epoll_ctl() to return ENOTSOCK when sock argument is not a socket

This commit is contained in:
Bert Belder 2017-12-05 05:02:57 +01:00
parent 4159a14364
commit e5a8d83c8b
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ static ssize_t _afd_get_protocol_info(SOCKET socket,
SO_PROTOCOL_INFOW, SO_PROTOCOL_INFOW,
(char*) protocol_info, (char*) protocol_info,
&opt_len) != 0) &opt_len) != 0)
return_error(-1); return_handle_error(-1, socket);
id = -1; id = -1;
for (size_t i = 0; i < array_count(AFD_PROVIDER_GUID_LIST); i++) { for (size_t i = 0; i < array_count(AFD_PROVIDER_GUID_LIST); i++) {

View File

@ -95,7 +95,7 @@
X(WSAENETUNREACH, ENETUNREACH) \ X(WSAENETUNREACH, ENETUNREACH) \
X(WSAENOBUFS, ENOMEM) \ X(WSAENOBUFS, ENOMEM) \
X(WSAENOTCONN, ENOTCONN) \ X(WSAENOTCONN, ENOTCONN) \
X(WSAENOTSOCK, EBADF) \ X(WSAENOTSOCK, ENOTSOCK) \
X(WSAEOPNOTSUPP, EOPNOTSUPP) \ X(WSAEOPNOTSUPP, EOPNOTSUPP) \
X(WSAESHUTDOWN, EPIPE) \ X(WSAESHUTDOWN, EPIPE) \
X(WSAETIMEDOUT, ETIMEDOUT) \ X(WSAETIMEDOUT, ETIMEDOUT) \