Module Name:    src
Committed By:   njoly
Date:           Wed Jul 22 17:19:44 UTC 2009

Modified Files:
        src/sys/compat/netbsd32: netbsd32_socket.c

Log Message:
Make compat netbsd32 sendmsg follow the native version by allowing
empty messages. This let unfdpass regression test work as expected.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/compat/netbsd32/netbsd32_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/netbsd32/netbsd32_socket.c
diff -u src/sys/compat/netbsd32/netbsd32_socket.c:1.35 src/sys/compat/netbsd32/netbsd32_socket.c:1.36
--- src/sys/compat/netbsd32/netbsd32_socket.c:1.35	Mon Jun 15 22:59:53 2009
+++ src/sys/compat/netbsd32/netbsd32_socket.c	Wed Jul 22 17:19:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_socket.c,v 1.35 2009/06/15 22:59:53 njoly Exp $	*/
+/*	$NetBSD: netbsd32_socket.c,v 1.36 2009/07/22 17:19:44 njoly Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.35 2009/06/15 22:59:53 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.36 2009/07/22 17:19:44 njoly Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -238,10 +238,8 @@
 		iov = (struct iovec *)malloc(
 		       sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV,
 		       M_WAITOK);
-	} else if ((u_int)msg.msg_iovlen > 0)
+	} else
 		iov = aiov;
-	else
-		return (EMSGSIZE);
 
 	iov32 = NETBSD32PTR64(msg32.msg_iov);
 	error = netbsd32_to_iovecin(iov32, iov, msg.msg_iovlen);

Reply via email to