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

* ext/socket/ancdata.c (rsock_discard_cmsg_resource): defined

unconditionally.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-03-02 12:14:35 +00:00
parent a36ea435d2
commit fb5d4ecfb5
4 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Mon Mar 2 21:13:42 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/ancdata.c (rsock_discard_cmsg_resource): defined
unconditionally.
Mon Mar 2 21:06:40 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/raddrinfo.c (addrinfo_mload): don't use "sun" variable

View file

@ -1387,10 +1387,12 @@ discard_cmsg(struct cmsghdr *cmh, char *msg_end)
}
}
}
#endif
void
rsock_discard_cmsg_resource(struct msghdr *mh)
{
#if defined(HAVE_ST_MSG_CONTROL)
struct cmsghdr *cmh;
char *msg_end;
@ -1402,8 +1404,8 @@ rsock_discard_cmsg_resource(struct msghdr *mh)
for (cmh = CMSG_FIRSTHDR(mh); cmh != NULL; cmh = CMSG_NXTHDR(mh, cmh)) {
discard_cmsg(cmh, msg_end);
}
}
#endif
}
#if defined(HAVE_ST_MSG_CONTROL)
static void

View file

@ -312,6 +312,7 @@ class TestSocket < Test::Unit::TestCase
def test_timestamp
return if /linux|freebsd|netbsd|openbsd|solaris|darwin/ !~ RUBY_PLATFORM
return if !defined?(Socket::AncillaryData)
t1 = Time.now.strftime("%Y-%m-%d")
stamp = nil
Addrinfo.udp("127.0.0.1", 0).bind {|s1|

View file

@ -69,6 +69,7 @@ class TestSocket_UNIXSocket < Test::Unit::TestCase
def test_fd_passing_n2
io_ary = []
return if !defined?(Socket::SCM_RIGHTS)
return if !defined?(Socket::AncillaryData)
io_ary.concat IO.pipe
io_ary.concat IO.pipe
io_ary.concat IO.pipe