ruby-changes:24502
From: nobu <ko1@a...>
Date: Sat, 28 Jul 2012 11:16:19 +0900 (JST)
Subject: [ruby-changes:24502] nobu:r36553 (trunk): ext/socket: suppress warnings on mingw64
nobu 2012-07-28 11:14:23 +0900 (Sat, 28 Jul 2012) New Revision: 36553 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36553 Log: 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. Modified files: trunk/ext/socket/ancdata.c trunk/ext/socket/option.c Index: ext/socket/option.c =================================================================== --- ext/socket/option.c (revision 36552) +++ ext/socket/option.c (revision 36553) @@ -452,6 +452,8 @@ #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". */ Index: ext/socket/ancdata.c =================================================================== --- ext/socket/ancdata.c (revision 36552) +++ ext/socket/ancdata.c (revision 36553) @@ -1114,7 +1114,7 @@ nogvl_sendmsg_func(void *ptr) { struct sendmsg_args_struct *args = ptr; - return (void *)sendmsg(args->fd, args->msg, args->flags); + return (void *)(VALUE)sendmsg(args->fd, args->msg, args->flags); } static ssize_t -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/