From: Paul Gofman <pgofman@codeweavers.com> --- dlls/ws2_32/socket.c | 1 + dlls/ws2_32/tests/sock.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index f5580cab4e3..b2601c6e4af 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3022,6 +3022,7 @@ int WINAPI select( int count, fd_set *read_ptr, fd_set *write_ptr, status = NtDeviceIoControlFile( (HANDLE)poll_socket, sync_event, NULL, NULL, &io, IOCTL_AFD_POLL, params, params_size, params, params_size ); + if (status == STATUS_NOT_SUPPORTED) status = STATUS_INVALID_HANDLE; if (status == STATUS_PENDING) { if (wait_event_alertable( sync_event ) == WAIT_FAILED) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index a8ad034530c..e67e50907b0 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -4477,7 +4477,7 @@ static void test_select(void) SetLastError(0); ret = select(maxfd + 1, &readfds, &writefds, &exceptfds, &select_timeout); ok ( (ret == SOCKET_ERROR), "expected SOCKET_ERROR, got %i\n", ret); - todo_wine ok ( WSAGetLastError() == WSAENOTSOCK, "expected WSAENOTSOCK, got %i\n", WSAGetLastError()); + ok ( WSAGetLastError() == WSAENOTSOCK, "expected WSAENOTSOCK, got %i\n", WSAGetLastError()); ok ( FD_ISSET((SOCKET)file, &readfds), "FD should be set\n"); FD_ZERO(&readfds); @@ -4496,7 +4496,7 @@ static void test_select(void) SetLastError(0); ret = select(maxfd + 1, &readfds, &writefds, &exceptfds, &select_timeout); ok ( (ret == SOCKET_ERROR), "expected SOCKET_ERROR, got %i\n", ret); - todo_wine ok ( WSAGetLastError() == WSAENOTSOCK, "expected WSAENOTSOCK, got %i\n", WSAGetLastError()); + ok ( WSAGetLastError() == WSAENOTSOCK, "expected WSAENOTSOCK, got %i\n", WSAGetLastError()); /* Test with duplicated handle of valid socket. */ FD_ZERO_ALL(); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10894