summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-06-24 04:24:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-06-24 04:24:09 +0000
commit031d2e84df58ed54948671931544c41cf32da1ca (patch)
tree1118362b178f55bf14d142752b8d61976191b991 /ext/socket
parent37bcc42c983987ec504efd9556f0cb884f0b424d (diff)
990624
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/getaddrinfo.c1
-rw-r--r--ext/socket/socket.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index 7ae41e6030..aab7207cdf 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -55,6 +55,7 @@
#include <unistd.h>
#else
#include <winsock2.h>
+#include <io.h>
#endif
#include <string.h>
#include <stdio.h>
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index adf622c118..f4ee19e11e 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -487,7 +487,7 @@ ip_addrsetup(host, port)
if (*name == 0) {
mkinetaddr(INADDR_ANY, hbuf, sizeof(hbuf));
}
- if (name[0] == '<' && strcmp(name, "<broadcast>") == 0) {
+ else if (name[0] == '<' && strcmp(name, "<broadcast>") == 0) {
mkinetaddr(INADDR_BROADCAST, hbuf, sizeof(hbuf));
}
else {
@@ -594,6 +594,7 @@ ruby_socket(domain, type, proto)
fd = socket(domain, type, proto);
}
}
+ return fd;
}
static int