diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-03-02 03:51:50 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-03-02 03:51:50 +0000 |
commit | 58e68a3660c47739d7a70cc6f5cdebec030502d2 (patch) | |
tree | e66bc7e98dd9a64d633af4220bcae7e63994e1b8 /ext | |
parent | 58dd5de9664c57d72b45fd90a75f08fab506f208 (diff) |
2000-03-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/extconf.rb | 4 | ||||
-rw-r--r-- | ext/socket/socket.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index b7aee1cc36..6a2937bb3f 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -244,7 +244,9 @@ main() } } - if (inet6 != 2 || inet4 != 2) + if (!(inet4 == 0 || inet4 == 2)) + goto bad; + if (!(inet6 == 0 || inet6 == 2)) goto bad; if (aitop) diff --git a/ext/socket/socket.c b/ext/socket/socket.c index a3ba1925b2..95b2214afb 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -511,6 +511,7 @@ ip_addrsetup(host, port) long i = NUM2LONG(host); mkinetaddr(htonl(i), hbuf, sizeof(hbuf)); + hostp = hbuf; } else { char *name = STR2CSTR(host); @@ -524,8 +525,8 @@ ip_addrsetup(host, port) else { strcpy(hbuf, name); } + hostp = hbuf; } - hostp = hbuf; if (NIL_P(port)) { portp = 0; } |