* 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
This commit is contained in:
usa 2015-11-18 01:37:34 +00:00
parent ca5f5871e8
commit d8e1939232
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,9 @@
Wed Nov 18 10:33:06 2015 NAKAMURA Usaku <usa@ruby-lang.org>
* 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.
Wed Nov 18 10:12:36 2015 Eric Wong <e@80x24.org> Wed Nov 18 10:12:36 2015 Eric Wong <e@80x24.org>
* ext/socket/ancdata.c (bsock_recvmsg_internal): use 4096 as * ext/socket/ancdata.c (bsock_recvmsg_internal): use 4096 as

View File

@ -1570,6 +1570,10 @@ bsock_recvmsg_internal(VALUE sock,
gc_done = 1; gc_done = 1;
goto retry; goto retry;
} }
#else
if (grow_buffer && errno == EMSGSIZE)
ss = (ssize_t)iov.iov_len;
else
#endif #endif
rb_sys_fail("recvmsg(2)"); rb_sys_fail("recvmsg(2)");
} }