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/rubysocket.h | |
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/rubysocket.h')
-rw-r--r-- | ext/socket/rubysocket.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index ecd1dfd..352da8c 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -430,4 +430,12 @@ static inline void rsock_maybe_wait_fd(int fd) { } # define MSG_DONTWAIT_RELIABLE 0 #endif +#if !defined HAVE_INET_NTOP && ! defined _WIN32 +const char *inet_ntop(int, const void *, char *, size_t); +#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 + #endif |