X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fconnect.c;h=ea03e77bc04ef5951ad3ad92074647e5db669b32;hb=7ef852ba849ac1fc4bef6d48e47e2dd3c0914feb;hp=c7abf204d21cacb8501caecee321afd55c04bc09;hpb=11ee0e1340f95ccb9954e522f6e003b3125eb109;p=gnulib.git diff --git a/lib/connect.c b/lib/connect.c index c7abf204d..ea03e77bc 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -1,6 +1,6 @@ /* connect.c --- wrappers for Windows connect function - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,16 +29,16 @@ #undef connect int -rpl_connect (int fd, struct sockaddr *sockaddr, int len) +rpl_connect (int fd, const struct sockaddr *sockaddr, socklen_t len) { SOCKET sock = FD_TO_SOCKET (fd); int r = connect (sock, sockaddr, len); if (r < 0) { /* EINPROGRESS is not returned by WinSock 2.0; for backwards - compatibility, connect(2) uses EWOULDBLOCK. */ + compatibility, connect(2) uses EWOULDBLOCK. */ if (WSAGetLastError () == WSAEWOULDBLOCK) - WSASetLastError (WSAEINPROGRESS); + WSASetLastError (WSAEINPROGRESS); set_winsock_errno (); }