summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-16 14:34:01 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-16 14:34:01 +0000
commit351f54de4505dac2a5b4c54727dfa366962fc1cb (patch)
tree3a7fd2869fd9f3d0fcc89ff7ee7d27ebdb179867 /ext
parent112b228273eb58912e5de30ba684a1ce912213a6 (diff)
* ext/socket/ancdata.c (bsock_sendmsg_internal) [OpenBSD]: don't remove
the last padding to prevent sendmsg failure in test_udp_server in test/socket/test_socket.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/ancdata.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index fdbaf62c51..b78af5460a 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -927,9 +927,11 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
MEMCPY(CMSG_DATA(cmh), RSTRING_PTR(cdata), char, RSTRING_LEN(cdata));
last_pad = cspace - cmh->cmsg_len;
}
+#if !defined(__OpenBSD__)
if (last_pad) {
rb_str_set_len(controls_str, RSTRING_LEN(controls_str)-last_pad);
}
+#endif
#else
rb_raise(rb_eNotImpError, "control message for sendmsg is unimplemented");
#endif