summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-15 16:27:26 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-15 16:27:26 +0000
commit9be25461b8f9ab996d7fff99c7f04b3d8dcccaa4 (patch)
treef1dde20fe04f990d2406275405972290ea1f27e1 /gnu
parent8332edeb582077739f86f898af5876386fbefc00 (diff)
This should set msg_control using CMSG_SIZE(), and not assume that
sizeof(buffer) is the right size (alignments can mess it up). Code is apparently not used, but it is better if all examples show the correct idiom ok hshoexer
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/perl/perl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/perl/perl.c b/gnu/usr.bin/perl/perl.c
index 1674458edd5..c9799f0b349 100644
--- a/gnu/usr.bin/perl/perl.c
+++ b/gnu/usr.bin/perl/perl.c
@@ -451,7 +451,7 @@ Perl_dump_sv_child(pTHX_ SV *sv)
be open, the wait would be forever. */
msg.msg_control = control.control;
- msg.msg_controllen = sizeof(control.control);
+ msg.msg_controllen = CMSG_LEN(sizeof(int));
/* We're a connected socket so we don't need a destination */
msg.msg_name = NULL;
msg.msg_namelen = 0;
@@ -716,7 +716,7 @@ perl_destruct(pTHXx)
int got_fd;
msg.msg_control = control.control;
- msg.msg_controllen = sizeof(control.control);
+ msg.msg_controllen = CMSG_LEN(sizeof(int));
/* We're a connected socket so we don't need a source */
msg.msg_name = NULL;
msg.msg_namelen = 0;