From 82eeaadc5d2df4a7f02ed178cabcda45a2d92eab Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 23 Feb 2014 03:18:56 +0000 Subject: option.c: use rb_w32_inet_pton * ext/socket/option.c (inet_pton): use rb_w32_inet_pton, instead of inet_ntop directly, which is unavailable on older version Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- ext/socket/raddrinfo.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3586562e2a..573ef9e774 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Sun Feb 23 11:54:02 2014 Nobuyoshi Nakada +Sun Feb 23 12:18:54 2014 Nobuyoshi Nakada + + * ext/socket/option.c (inet_pton): use rb_w32_inet_pton, instead of + inet_ntop directly, which is unavailable on older version Windows. * include/ruby/win32.h, win32/win32.c (rb_w32_inet_pton): add a wrapper function for inet_pton minimum supported client is diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index ee494e600b..1ec03eb489 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -177,6 +177,10 @@ numeric_getaddrinfo(const char *node, const char *service, struct addrinfo **res) { #ifdef HAVE_INET_PTON +# if defined __MINGW64__ +# define inet_pton(f,s,d) rb_w32_inet_pton(f,s,d) +# endif + if (node && (!service || strspn(service, "0123456789") == strlen(service))) { static const struct { int socktype; -- cgit v1.2.3