1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2012-07-29 14:57:30 +00:00
parent f9368f65b1
commit dc40114781
2 changed files with 6 additions and 3 deletions

View file

@ -1,4 +1,7 @@
Sun Jul 29 23:56:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sun Jul 29 23:57:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/socket/option.c (inet_ntop): use rb_w32_inet_ntop, instead of
inet_ntop directly, which is unavailable on older version Windows.
* win32/win32.c (rb_w32_inet_ntop): type should be const.

View file

@ -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". */