4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-03-02 13:05:42 +08:00

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.
This commit is contained in:
Ken Brown 2020-10-04 10:38:29 -04:00
parent 780133d455
commit 3eab592c22

View File

@ -2090,7 +2090,7 @@ wait:
if (io.Information == 0) if (io.Information == 0)
set_errno (EAGAIN); set_errno (EAGAIN);
else else
ret = io.Information; ret = io.Information - AF_UNIX_PKT_OFFSETOF_DATA (packet);
} }
else if (STATUS_PIPE_IS_CLOSED (status)) else if (STATUS_PIPE_IS_CLOSED (status))
{ {