diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-17 14:26:34 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-17 14:26:34 +0000 |
commit | 28cf7a6d6f105b500fd2e83291fbecc9dac2473d (patch) | |
tree | 838f5c6ad3ae1a7b3bb9bd2e692fe02acf0cf326 | |
parent | 536adb5d7cf0b35a3980f11f0512e85ff72d71e6 (diff) | |
download | ruby-28cf7a6d6f105b500fd2e83291fbecc9dac2473d.tar.gz |
* ext/socket/ancdata.c (bsock_sendmsg_internal): make the padding
removing only on NetBSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/socket/ancdata.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Feb 17 23:25:01 2009 Tanaka Akira <akr@fsij.org> + + * ext/socket/ancdata.c (bsock_sendmsg_internal): make the padding + removing only on NetBSD. + Tue Feb 17 19:39:04 2009 Tanaka Akira <akr@fsij.org> * ext/socket/ancdata.c (bsock_sendmsg_internal): should not remove the diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c index 531c7851a5..1be5e5d91e 100644 --- a/ext/socket/ancdata.c +++ b/ext/socket/ancdata.c @@ -951,8 +951,10 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock) * Basically, msg_controllen should contains the padding. * So the padding is removed only if a problem really exists. */ +#if defined(__NetBSD__) if (last_level == SOL_SOCKET && last_type == SCM_RIGHTS) rb_str_set_len(controls_str, RSTRING_LEN(controls_str)-last_pad); +#endif } #else rb_raise(rb_eNotImpError, "control message for sendmsg is unimplemented"); |