summaryrefslogtreecommitdiff
path: root/ext/socket/ancdata.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-18 01:37:34 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-18 01:37:34 +0000
commitd8e1939232b5f12ae79aca0975ef222008f4454b (patch)
tree43affcfa3d6c1b96015ff1d459a546b3ae118a3b /ext/socket/ancdata.c
parentca5f5871e8f54c76e804fb179e32a2ffa6fda4dc (diff)
* ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size
when EMSGSIZE occurs on non HAVE_STRUCT_MSGHDR_MSG_CONTROL platforms (such as, Windows). fixes a test error revealed by r52625. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/ancdata.c')
-rw-r--r--ext/socket/ancdata.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 9d28573..1a6b509 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -1570,6 +1570,10 @@ bsock_recvmsg_internal(VALUE sock,
gc_done = 1;
goto retry;
}
+#else
+ if (grow_buffer && errno == EMSGSIZE)
+ ss = (ssize_t)iov.iov_len;
+ else
#endif
rb_sys_fail("recvmsg(2)");
}