Juan Lang <juan.l...@gmail.com> writes:

> +BOOL netconn_connect( netconn_t *conn, const struct sockaddr *sockaddr, 
> unsigned int addr_len, int timeout )
>  {
> -    if (connect( conn->socket, sockaddr, addr_len ) == -1)
> +    int flags = -1, res;
> +
> +    if (timeout > 0)
> +        flags = fcntl( conn->socket, F_GETFL, 0 );
> +    if (flags != -1)
> +        fcntl( conn->socket, F_SETFL, flags | O_NONBLOCK );
> +    res = connect( conn->socket, sockaddr, addr_len );
> +    if (res == -1 && (errno == EINPROGRESS || errno == EAGAIN))

This won't compile on Windows. You should use ioctlsocket and friends.

-- 
Alexandre Julliard
julli...@winehq.org


Reply via email to