summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/connect.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2000-03-16 13:35:20 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2000-03-16 13:35:20 +0000
commitb070d1dce08a924cfdae5b5304318a990ebb73c8 (patch)
treeadbee9f1271b251af595e3a1ac42c545f02d3237 /otherlibs/win32unix/connect.c
parent3375e52091a4274b9503be74351a4aada59a94db (diff)
MAJ portage Win32
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2962 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix/connect.c')
-rw-r--r--otherlibs/win32unix/connect.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/otherlibs/win32unix/connect.c b/otherlibs/win32unix/connect.c
index 24380582b..dabcc4e84 100644
--- a/otherlibs/win32unix/connect.c
+++ b/otherlibs/win32unix/connect.c
@@ -21,10 +21,12 @@ value unix_connect(socket, address) /* ML */
{
SOCKET s = (SOCKET) Handle_val(socket);
int retcode;
+ union sock_addr_union addr;
+ socklen_param_type addr_len;
- get_sockaddr(address);
+ get_sockaddr(address, &addr, &addr_len);
enter_blocking_section();
- retcode = connect(s, &sock_addr.s_gen, sock_addr_len);
+ retcode = connect(s, &addr.s_gen, addr_len);
leave_blocking_section();
if (retcode == -1) unix_error(WSAGetLastError(), "connect", Nothing);
return Val_unit;