mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
c05e6a8cda
commit
485181e4f7
2 changed files with 3 additions and 1 deletions
|
@ -1114,7 +1114,7 @@ static void *
|
|||
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
|
||||
|
|
|
@ -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". */
|
||||
|
|
Loading…
Add table
Reference in a new issue