summaryrefslogtreecommitdiff
path: root/ext/socket/udpsocket.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-26 12:06:17 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-26 12:06:17 +0000
commit785f417270a7cb8f815514e63a7f4d4e8d1d377c (patch)
treeb30c312f5c3008b4d7735689725df7b0a1f51ae4 /ext/socket/udpsocket.c
parent07298aba22284e3eadc7d250205f365e3ff20d37 (diff)
* 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
Diffstat (limited to 'ext/socket/udpsocket.c')
-rw-r--r--ext/socket/udpsocket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c
index 8abed48..8638d81 100644
--- a/ext/socket/udpsocket.c
+++ b/ext/socket/udpsocket.c
@@ -62,6 +62,8 @@ udp_connect_internal(struct udp_arg *arg)
return Qfalse;
}
+VALUE rsock_freeaddrinfo(struct addrinfo *addr);
+
/*
* call-seq:
* udpsocket.connect(host, port) => 0
@@ -90,7 +92,7 @@ udp_connect(VALUE sock, VALUE host, VALUE port)
GetOpenFile(sock, fptr);
arg.fd = fptr->fd;
ret = rb_ensure(udp_connect_internal, (VALUE)&arg,
- RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)arg.res);
+ rsock_freeaddrinfo, (VALUE)arg.res);
if (!ret) rb_sys_fail("connect(2)");
return INT2FIX(0);
}