summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/shutdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/win32unix/shutdown.c')
-rw-r--r--otherlibs/win32unix/shutdown.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/otherlibs/win32unix/shutdown.c b/otherlibs/win32unix/shutdown.c
index 914a54247..313ab5e31 100644
--- a/otherlibs/win32unix/shutdown.c
+++ b/otherlibs/win32unix/shutdown.c
@@ -22,8 +22,10 @@ static int shutdown_command_table[] = {
value unix_shutdown(sock, cmd) /* ML */
value sock, cmd;
{
- if (shutdown((SOCKET) _get_osfhandle(Int_val(sock)),
- shutdown_command_table[Int_val(cmd)]) == -1)
+ if (shutdown((SOCKET) Handle_val(sock),
+ shutdown_command_table[Int_val(cmd)]) == -1) {
+ _dosmaperr(WSAGetLastError());
uerror("shutdown", Nothing);
+ }
return Val_unit;
}