From 3eab592c223e145cd32f8bf41e1b8a4ca26c4961 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sun, 4 Oct 2020 10:38:29 -0400 Subject: [PATCH] Cygwin: AF_UNIX: sendmsg: fix return value On a successful write, the return value is now the number of bytes of user data written, not the total number of bytes written. --- winsup/cygwin/fhandler_socket_unix.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc index 2816b0e31..30009500c 100644 --- a/winsup/cygwin/fhandler_socket_unix.cc +++ b/winsup/cygwin/fhandler_socket_unix.cc @@ -2090,7 +2090,7 @@ wait: if (io.Information == 0) set_errno (EAGAIN); else - ret = io.Information; + ret = io.Information - AF_UNIX_PKT_OFFSETOF_DATA (packet); } else if (STATUS_PIPE_IS_CLOSED (status)) {