6786163 read the 0 length message should return success instead of EWOULDBLOCK
diff --git a/usr/src/uts/common/fs/sockfs/sockcommon_subr.c b/usr/src/uts/common/fs/sockfs/sockcommon_subr.c
index 5e8d62b..a0bf299 100644
--- a/usr/src/uts/common/fs/sockfs/sockcommon_subr.c
+++ b/usr/src/uts/common/fs/sockfs/sockcommon_subr.c
@@ -911,7 +911,7 @@
 		 * No pending data. Return right away for nonblocking
 		 * socket, otherwise sleep waiting for data.
 		 */
-		if (!(so->so_state & SS_CANTRCVMORE)) {
+		if (!(so->so_state & SS_CANTRCVMORE) && uiop->uio_resid > 0) {
 			if ((uiop->uio_fmode & (FNDELAY|FNONBLOCK)) ||
 			    (flags & MSG_DONTWAIT)) {
 				error = EWOULDBLOCK;