summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/win32unix')
-rw-r--r--otherlibs/win32unix/accept.c2
-rw-r--r--otherlibs/win32unix/getpeername.c2
-rw-r--r--otherlibs/win32unix/getsockname.c2
-rw-r--r--otherlibs/win32unix/sendrecv.c2
-rw-r--r--otherlibs/win32unix/socketaddr.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/otherlibs/win32unix/accept.c b/otherlibs/win32unix/accept.c
index ec7068bd3..f751c3e39 100644
--- a/otherlibs/win32unix/accept.c
+++ b/otherlibs/win32unix/accept.c
@@ -57,7 +57,7 @@ CAMLprim value unix_accept(sock)
}
Begin_roots2 (fd, adr)
fd = win_alloc_socket(snew);
- adr = alloc_sockaddr(&addr, addr_len);
+ adr = alloc_sockaddr(&addr, addr_len, snew);
res = alloc_small(2, 0);
Field(res, 0) = fd;
Field(res, 1) = adr;
diff --git a/otherlibs/win32unix/getpeername.c b/otherlibs/win32unix/getpeername.c
index 4460a7917..9aeb4c21b 100644
--- a/otherlibs/win32unix/getpeername.c
+++ b/otherlibs/win32unix/getpeername.c
@@ -31,5 +31,5 @@ CAMLprim value unix_getpeername(sock)
win32_maperr(WSAGetLastError());
uerror("getpeername", Nothing);
}
- return alloc_sockaddr(&addr, addr_len);
+ return alloc_sockaddr(&addr, addr_len, -1);
}
diff --git a/otherlibs/win32unix/getsockname.c b/otherlibs/win32unix/getsockname.c
index 8a1de7857..88487a43b 100644
--- a/otherlibs/win32unix/getsockname.c
+++ b/otherlibs/win32unix/getsockname.c
@@ -28,5 +28,5 @@ CAMLprim value unix_getsockname(sock)
retcode = getsockname(Socket_val(sock),
&addr.s_gen, &addr_len);
if (retcode == -1) uerror("getsockname", Nothing);
- return alloc_sockaddr(&addr, addr_len);
+ return alloc_sockaddr(&addr, addr_len, -1);
}
diff --git a/otherlibs/win32unix/sendrecv.c b/otherlibs/win32unix/sendrecv.c
index 57ca0fdb2..cbb8ff42b 100644
--- a/otherlibs/win32unix/sendrecv.c
+++ b/otherlibs/win32unix/sendrecv.c
@@ -71,7 +71,7 @@ CAMLprim value unix_recvfrom(value sock, value buff, value ofs, value len, value
uerror("recvfrom", Nothing);
}
memmove (&Byte(buff, Long_val(ofs)), iobuf, ret);
- adr = alloc_sockaddr(&addr, addr_len);
+ adr = alloc_sockaddr(&addr, addr_len, -1);
res = alloc_small(2, 0);
Field(res, 0) = Val_int(ret);
Field(res, 1) = adr;
diff --git a/otherlibs/win32unix/socketaddr.h b/otherlibs/win32unix/socketaddr.h
index 79c3e6365..8abc63b47 100644
--- a/otherlibs/win32unix/socketaddr.h
+++ b/otherlibs/win32unix/socketaddr.h
@@ -32,6 +32,6 @@ extern void get_sockaddr (value mladdr,
union sock_addr_union * addr /*out*/,
socklen_param_type * addr_len /*out*/);
CAMLprim value alloc_sockaddr (union sock_addr_union * addr /*in*/,
- socklen_param_type addr_len);
+ socklen_param_type addr_len, int close_on_error);
CAMLprim value alloc_inet_addr (struct in_addr * inaddr);
#define GET_INET_ADDR(v) (*((struct in_addr *) (v)))