1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/raddrinfo.c, ext/socket/udpsocket.c: avoid illegal cast

from void-returning function to VALUE-returning one.  It causes SEGV
  on RubySpec with mingw32.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2010-02-26 12:06:17 +00:00
parent 07298aba22
commit 785f417270
3 changed files with 17 additions and 2 deletions

View file

@ -456,6 +456,13 @@ make_hostent_internal(struct hostent_arg *arg)
return ary;
}
VALUE
rsock_freeaddrinfo(struct addrinfo *addr)
{
freeaddrinfo(addr);
return Qnil;
}
VALUE
rsock_make_hostent(VALUE host, struct addrinfo *addr, VALUE (*ipaddr)(struct sockaddr *, size_t))
{
@ -465,7 +472,7 @@ rsock_make_hostent(VALUE host, struct addrinfo *addr, VALUE (*ipaddr)(struct soc
arg.addr = addr;
arg.ipaddr = ipaddr;
return rb_ensure(make_hostent_internal, (VALUE)&arg,
RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr);
rsock_freeaddrinfo, (VALUE)addr);
}
typedef struct {