changeset 2211:f974aefae43d

. Correctly initialise msghdr (in particular, prevent garbage in msg_control, msg_controllen) before calling recvmsg/sendmsg as per Linux. Problem report by: Joe Lin <jlin@maxiscale.com>
author Greg Lewis <glewis@eyesbeyond.com>
date Wed, 03 Feb 2010 23:46:39 -0800
parents 3ba2add1e969
children 107a25f9da0c
files src/solaris/native/sun/nio/ch/DatagramDispatcher.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/sun/nio/ch/DatagramDispatcher.c	Sat Jan 30 21:55:16 2010 -0800
+++ b/src/solaris/native/sun/nio/ch/DatagramDispatcher.c	Wed Feb 03 23:46:39 2010 -0800
@@ -73,7 +73,7 @@
     m.msg_accrightslen = 0;
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
     m.msg_control = NULL;
     m.msg_controllen = 0;
 #endif
@@ -121,7 +121,7 @@
     m.msg_accrightslen = 0;
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
     m.msg_control = NULL;
     m.msg_controllen = 0;
 #endif