diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-04-21 12:01:06 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-04-29 10:52:36 +0200 |
commit | 9adea5f7f7a23ef4a1231289a36a94c52347b142 (patch) | |
tree | 5fb89a0ceb3cee9f8a81c5f4187a5080991117c2 /util/iov.c | |
parent | c12915e638a31010923b8dbbf8ce06f564a175f9 (diff) | |
download | qemu-9adea5f7f7a23ef4a1231289a36a94c52347b142.zip qemu-9adea5f7f7a23ef4a1231289a36a94c52347b142.tar.gz qemu-9adea5f7f7a23ef4a1231289a36a94c52347b142.tar.bz2 |
win32: add readv/writev emulation
Commit e9d8fbf (qemu-file: do not use stdio for qemu_fdopen, 2013-03-27)
introduced a usage of writev, which mingw32 does not have. Even though
qemu_fdopen itself is not used on mingw32, the future-proof solution is
to add an implementation of it. This is simple and similar to how we
emulate sendmsg/recvmsg in util/iov.c.
Some files include osdep.h without qemu-common.h, so move the definition
of iovec to osdep.h too, and include osdep.h from qemu-common.h
unconditionally (protection against including files when NEED_CPU_H is
defined is not needed since the removal of AREG0).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util/iov.c')
-rw-r--r-- | util/iov.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -99,7 +99,7 @@ size_t iov_size(const struct iovec *iov, const unsigned int iov_cnt) static ssize_t do_send_recv(int sockfd, struct iovec *iov, unsigned iov_cnt, bool do_send) { -#if defined CONFIG_IOVEC && defined CONFIG_POSIX +#ifdef CONFIG_POSIX ssize_t ret; struct msghdr msg; memset(&msg, 0, sizeof(msg)); |