iov_send_recv(): Handle zero bytes case even if OS does not
POSIX allows sendmsg() and recvmsg() to fail EMSGSIZE if passed a zero msg.msg_iovlen (in particular the MacOS X implementation will do this). Handle the case where iov_send_recv() is passed a zero byte count explicitly, to avoid accidentally depending on the OS to treat zero msg_iovlen as a no-op. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Acked-by: NMichael Tokarev <mjt@tls.msk.ru> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Showing
想要评论请 注册 或 登录