summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 8974096bbc..e1f84376aa 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -849,9 +849,11 @@ open_inet(class, remote_host, remote_serv, local_host, local_serv, type)
continue;
}
if (type == INET_SERVER) {
+#ifndef NT
status = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
(char*)&status, sizeof(status));
+#endif
status = bind(fd, res->ai_addr, res->ai_addrlen);
syscall = "bind(2)";
}