diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-29 14:57:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-29 14:57:30 +0000 |
commit | dc40114781a776f95ac85e0e9d4cf79b030aada6 (patch) | |
tree | 5ff6e8eef8b27f8552c272c9a03dc6f06dc69056 /ext | |
parent | f9368f65b108264889d54855e687334f7e84f092 (diff) | |
download | ruby-dc40114781a776f95ac85e0e9d4cf79b030aada6.tar.gz |
option.c: use rb_w32_inet_ntop
* ext/socket/option.c (inet_ntop): use rb_w32_inet_ntop, instead of
inet_ntop directly, which is unavailable on older version Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/option.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/option.c b/ext/socket/option.c index 37315629f2..fe3cc6c02c 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -452,8 +452,8 @@ inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len) #endif return numaddr; } -#elif !defined HAVE_ARPA_INET_H -extern char *inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len); +#elif defined _WIN32 +# define inet_ntop(f,a,n,l) rb_w32_inet_ntop(f,a,n,l) #endif /* Although the buffer size needed depends on the prefixes, "%u" may generate "4294967295". */ |