summaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-05 20:05:26 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-05 20:05:26 +0000
commitbf9298b90eee0b95cab11fc74790dcbddca4252e (patch)
tree5073e5a326855e8044de043bd882cc29759c4364 /qemu-common.h
parenta38131b669253fe40eff41e17ab7d1df78adbcd8 (diff)
downloadqemu-bf9298b90eee0b95cab11fc74790dcbddca4252e.tar.gz
Make struct iovec universally available
Vectored IO APIs will require some sort of vector argument. It makes sense to use struct iovec and just define it globally for Windows. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5889 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-common.h')
-rw-r--r--qemu-common.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/qemu-common.h b/qemu-common.h
index 308847a21d..e1546c671b 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -16,6 +16,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
+#include "config-host.h"
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
@@ -28,6 +29,14 @@
#define ENOMEDIUM ENODEV
#endif
+#ifndef HAVE_IOVEC
+#define HAVE_IOVEC
+struct iovec {
+ void *iov_base;
+ size_t iov_len;
+};
+#endif
+
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#define WINVER 0x0501 /* needed for ipv6 bits */
@@ -54,7 +63,6 @@ static inline char *realpath(const char *path, char *resolved_path)
/* FIXME: Remove NEED_CPU_H. */
#ifndef NEED_CPU_H
-#include "config-host.h"
#include <setjmp.h>
#include "osdep.h"
#include "bswap.h"