summaryrefslogtreecommitdiff
path: root/ext/socket/getaddrinfo.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-01 09:42:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-01 09:42:38 +0000
commitfedf48986da718580062d081dda38c4ee182c254 (patch)
tree65e06d76c544a8d80296d686bf88ec3af41fdc50 /ext/socket/getaddrinfo.c
parentacbb1c943457d3b8802f099ee0e34331bc78bd38 (diff)
2000-05-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/getaddrinfo.c')
-rw-r--r--ext/socket/getaddrinfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index 0b9d9b6..c312b92 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -421,7 +421,11 @@ getaddrinfo(hostname, servname, hints, res)
s = socket(afd->a_af, SOCK_DGRAM, 0);
if (s < 0)
continue;
+#if defined(HAVE_CLOSESOCKET)
+ closesocket(s);
+#else
close(s);
+#endif
if (pai->ai_flags & AI_PASSIVE) {
GET_AI(cur->ai_next, afd, afd->a_addrany, port);