summaryrefslogtreecommitdiff
path: root/ext/socket/option.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-28 02:14:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-28 02:14:23 +0000
commit485181e4f714b12c4a6cea239d534da75454acdc (patch)
tree943802f79cc990d69e3415b2a33b714bcbdaf446 /ext/socket/option.c
parentc05e6a8cda4701d995d8e4b2390ee2b88b51e6d6 (diff)
ext/socket: suppress warnings on mingw64
* ext/socket/ancdata.c (nogvl_sendmsg_func): explicitly cast via VALUE to suppress a warning on mingw64. * ext/socket/option.c: declare inet_ntop() for mingw64 which has the function but lacks arpa/inet.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/option.c')
-rw-r--r--ext/socket/option.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/socket/option.c b/ext/socket/option.c
index 1f334bb..4cef1c8 100644
--- a/ext/socket/option.c
+++ b/ext/socket/option.c
@@ -452,6 +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);
#endif
/* Although the buffer size needed depends on the prefixes, "%u" may generate "4294967295". */