Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/syscall Set the cmsg_len and msg_controllen in cmsg_se...
details: https://anonhg.NetBSD.org/src/rev/d698caa2f9b4
branches: trunk
changeset: 757384:d698caa2f9b4
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Fri Aug 27 10:03:14 2010 +0000
description:
Set the cmsg_len and msg_controllen in cmsg_sendfd testcase to match
the usage in the cmsg_sendfd_bounds case. This test now passes on an
amd64 machine.
Change suggested by and OK'd by pooka@
diffstat:
tests/syscall/t_cmsg.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (26 lines):
diff -r 977a881802ab -r d698caa2f9b4 tests/syscall/t_cmsg.c
--- a/tests/syscall/t_cmsg.c Fri Aug 27 10:01:04 2010 +0000
+++ b/tests/syscall/t_cmsg.c Fri Aug 27 10:03:14 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cmsg.c,v 1.13 2009/12/18 21:24:13 pooka Exp $ */
+/* $NetBSD: t_cmsg.c,v 1.14 2010/08/27 10:03:14 pgoyette Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -135,14 +135,14 @@
cmp->cmsg_level = SOL_SOCKET;
cmp->cmsg_type = SCM_RIGHTS;
- cmp->cmsg_len = CMSG_SPACE(sizeof(int));
+ cmp->cmsg_len = CMSG_LEN(sizeof(int));
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_name = NULL;
msg.msg_namelen = 0;
msg.msg_control = cmp;
- msg.msg_controllen = CMSG_LEN(sizeof(int));
+ msg.msg_controllen = CMSG_SPACE(sizeof(int));
*(int *)CMSG_DATA(cmp) = fd[0];
/* pass the fd */
Home |
Main Index |
Thread Index |
Old Index