summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/win32unix/socket.c')
-rw-r--r--otherlibs/win32unix/socket.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/otherlibs/win32unix/socket.c b/otherlibs/win32unix/socket.c
index c07d76881..9423f5585 100644
--- a/otherlibs/win32unix/socket.c
+++ b/otherlibs/win32unix/socket.c
@@ -48,6 +48,9 @@ CAMLprim value unix_socket(domain, type, proto)
setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
(char *) &oldvalue, oldvaluelen);
}
- if (s == INVALID_SOCKET) unix_error(WSAGetLastError(), "socket", Nothing);
+ if (s == INVALID_SOCKET) {
+ win32_maperr(WSAGetLastError());
+ uerror("socket", Nothing);
+ }
return win_alloc_handle((HANDLE) s);
}