summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-23 03:18:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-23 03:18:56 +0000
commit82eeaadc5d2df4a7f02ed178cabcda45a2d92eab (patch)
tree5997893ab8c8550b3f0be54db9879abc0de967e3 /ext/socket
parent1b81dafdd5601dbfe0818b4ddc1c4a53ecd0270d (diff)
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
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/raddrinfo.c4
1 files changed, 4 insertions, 0 deletions
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;