Fixed errno processing for connect() on Windows.
[deb_libnfs.git] / lib / socket.c
index c746c76affeb2efe123aa3ec752040eec281be34..1bb34f0ef9e57212d7919d4fee3d0d524c3488f6 100644 (file)
@@ -412,13 +412,8 @@ static int rpc_connect_sockaddr_async(struct rpc_context *rpc, struct sockaddr_s
 
        set_nonblocking(rpc->fd);
 
-#if defined(WIN32)
-       if (connect(rpc->fd, (struct sockaddr *)s, socksize) == 0 && errno != EINPROGRESS   )
-#else
-       if (connect(rpc->fd, (struct sockaddr *)s, socksize) != 0 && errno != EINPROGRESS) 
-#endif
-       {
-         rpc_set_error(rpc, "connect() to server failed. %s(%d)", strerror(errno), errno);
+       if (connect(rpc->fd, (struct sockaddr *)s, socksize) != 0 && errno != EINPROGRESS) {
+               rpc_set_error(rpc, "connect() to server failed. %s(%d)", strerror(errno), errno);
                return -1;
        }