summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-17 14:26:34 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-17 14:26:34 +0000
commit28cf7a6d6f105b500fd2e83291fbecc9dac2473d (patch)
tree838f5c6ad3ae1a7b3bb9bd2e692fe02acf0cf326 /ext
parent536adb5d7cf0b35a3980f11f0512e85ff72d71e6 (diff)
* 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
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 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");