diff options
| author | joerg <joerg@NetBSD.org> | 2012-01-20 14:08:04 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2012-01-20 14:08:04 +0000 |
| commit | c603943270eacd95a1dac6ba241e82bd75a8386a (patch) | |
| tree | b9efeb8f7bbfbb572a135a320210e5a4f024d032 /sys/compat/linux/common/linux_socket.c | |
| parent | eb1e78347cda1d5d6500c67db139882ca19f7935 (diff) | |
Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
Diffstat (limited to 'sys/compat/linux/common/linux_socket.c')
| -rw-r--r-- | sys/compat/linux/common/linux_socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/linux/common/linux_socket.c b/sys/compat/linux/common/linux_socket.c index fb35c837a10..66220be7d37 100644 --- a/sys/compat/linux/common/linux_socket.c +++ b/sys/compat/linux/common/linux_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.111 2011/12/20 23:56:28 christos Exp $ */ +/* $NetBSD: linux_socket.c,v 1.112 2012/01/20 14:08:07 joerg Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.111 2011/12/20 23:56:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.112 2012/01/20 14:08:07 joerg Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -595,11 +595,11 @@ linux_sys_sendmsg(struct lwp *l, const struct linux_sys_sendmsg_args *uap, regis /* Zero area between header and data */ memset(cmsg + 1, 0, - CMSG_ALIGN(sizeof(cmsg)) - sizeof(cmsg)); + CMSG_ALIGN(sizeof(*cmsg)) - sizeof(*cmsg)); /* Copyin the data */ error = copyin(LINUX_CMSG_DATA(l_cc), - CMSG_DATA(control), + CMSG_DATA(cmsg), l_cmsg.cmsg_len - sizeof(l_cmsg)); if (error) goto done; |
