path: root/ext
diff options
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-05 08:09:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-05 08:09:12 +0000
commitc2fb27ac4a5b62571136489918a9c99bb17c821a (patch)
tree1818b03488a49ec450cdd7c34d6fa1d46e2f8482 /ext
parentd71c745b40a0cd49622cca57a93364edafb6409c (diff)
socket/option.c: fix inet_ntop link error on mswin
* ext/socket/option.c (inet_ntop): link aliased inet_ntop in libruby on mswin not rb_w32_inet_ntop which fails to link for unknown reason. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/socket/option.c b/ext/socket/option.c
index 2c4e77b673..98f0ddc3b0 100644
--- a/ext/socket/option.c
+++ b/ext/socket/option.c
@@ -658,8 +658,10 @@ inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len)
return numaddr;
-#elif defined _WIN32
+#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);
/* Although the buffer size needed depends on the prefixes, "%u" may generate "4294967295". */