summaryrefslogtreecommitdiff
path: root/ext/socket/raddrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/raddrinfo.c')
-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 ee494e600b2..1ec03eb4897 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;