diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-02 03:37:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-02 03:37:02 +0000 |
commit | aa8e9c63ad0300df0eed07c3fe4f19d859a63673 (patch) | |
tree | 2404e5ccba3223b54eaea524eb9b6408450726d5 /ext/socket/option.c | |
parent | f65180025b0055e1d28f24b97a438e3c6c1a6ed9 (diff) |
socket/option.c: inet_ntop
* ext/socket/option.c, ext/socket/rubysocket.h (inet_ntop): share
the fallback definition. [ruby-core:76646] [Bug #12645]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/option.c')
-rw-r--r-- | ext/socket/option.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/socket/option.c b/ext/socket/option.c index 7307548e50..a823ec7757 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -645,7 +645,7 @@ inspect_timeval_as_interval(int level, int optname, VALUE data, VALUE ret) */ #if !defined HAVE_INET_NTOP && ! defined _WIN32 -static const char * +const char * inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len) { #ifdef HAVE_INET_NTOA @@ -660,10 +660,6 @@ inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len) #endif return numaddr; } -#elif defined __MINGW32__ -# define inet_ntop(f,a,n,l) rb_w32_inet_ntop(f,a,n,l) -#elif defined _MSC_VER && RUBY_MSVCRT_VERSION < 90 -const char *WSAAPI inet_ntop(int, const void *, char *, size_t); #endif /* Although the buffer size needed depends on the prefixes, "%u" may generate "4294967295". */ |