Module Name:    src
Committed By:   njoly
Date:           Tue Jun 16 22:56:49 UTC 2009

Modified Files:
        src/sys/compat/linux/common: linux_socket.c

Log Message:
For linux cmsg header copyout, use the linux structure size, not the
native one.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/compat/linux/common/linux_socket.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/common/linux_socket.c
diff -u src/sys/compat/linux/common/linux_socket.c:1.101 src/sys/compat/linux/common/linux_socket.c:1.102
--- src/sys/compat/linux/common/linux_socket.c:1.101	Tue Jun 16 15:56:10 2009
+++ src/sys/compat/linux/common/linux_socket.c	Tue Jun 16 22:56:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_socket.c,v 1.101 2009/06/16 15:56:10 njoly Exp $	*/
+/*	$NetBSD: linux_socket.c,v 1.102 2009/06/16 22:56:49 njoly 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.101 2009/06/16 15:56:10 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.102 2009/06/16 22:56:49 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -658,7 +658,7 @@
 		}
 
 		/* There can be padding between the header and data... */
-		error = copyout(&linux_cmsg, q, sizeof *cmsg);
+		error = copyout(&linux_cmsg, q, sizeof linux_cmsg);
 		if (error != 0) {
 			error = copyout(CCMSG_DATA(cmsg), q + sizeof linux_cmsg,
 			    dlen);

Reply via email to