Commit d8f962e6 authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

ws2_32: Do not make the unix file descriptor blocking. Too many places in the…

ws2_32: Do not make the unix file descriptor blocking. Too many places in the socket code assume it is not.
parent f3d24fdd
......@@ -2406,25 +2406,11 @@ int WINAPI WS_ioctlsocket(SOCKET s, LONG cmd, WS_u_long *argp)
SetLastError(WSAEINVAL);
return SOCKET_ERROR;
}
fd = get_sock_fd( s, 0, NULL );
if (fd != -1)
{
int ret;
if (*argp)
{
_enable_event(SOCKET2HANDLE(s), 0, FD_WINE_NONBLOCKING, 0);
ret = fcntl( fd, F_SETFL, O_NONBLOCK );
}
else
{
_enable_event(SOCKET2HANDLE(s), 0, 0, FD_WINE_NONBLOCKING);
ret = fcntl( fd, F_SETFL, 0 );
}
release_sock_fd( s, fd );
if (!ret) return 0;
SetLastError((errno == EBADF) ? WSAENOTSOCK : wsaErrno());
}
return SOCKET_ERROR;
return 0;
case WS_SIOCATMARK:
newcmd=SIOCATMARK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment