aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket/ancdata.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-17 05:06:18 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-17 05:06:18 +0000
commit66e2139b1a668681e63422cff57ddc2c36859b94 (patch)
treede49af3d81866012b3a89946cd083f876812e90e /ext/socket/ancdata.c
parent4b9cd6edce351b3ef506aabdcbc797a87f349750 (diff)
downloadruby-66e2139b1a668681e63422cff57ddc2c36859b94.tar.gz
* ext/socket/lib/socket.rb (Socket#recvmsg{,_nonblock}): default values
of clen must be nil. * ext/socket/ancdata.c (bsock_sendmsg_internal): handle nil of clen. fixes test errors introduced at r52602. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/ancdata.c')
-rw-r--r--ext/socket/ancdata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 7e0441c042..168f70c311 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -1467,7 +1467,7 @@ bsock_recvmsg_internal(VALUE sock,
maxdatlen = NUM2SIZET(vmaxdatlen);
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
- maxctllen = NUM2SIZET(vmaxctllen);
+ maxctllen = NIL_P(vmaxctllen) ? 4096 : NUM2SIZET(vmaxctllen);
#else
if (!NIL_P(vmaxctllen))
rb_raise(rb_eArgError, "control message not supported");