[Qemu-devel] [PATCH] osdep.h: include sys/types.h for ssize_t definition
This fixes build for mingw32 Signed-off-by: Igor Mitsyanko i.mitsya...@gmail.com --- include/qemu/osdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 42545bc..17946a3 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -163,6 +163,8 @@ int qemu_create_pidfile(const char *filename); int qemu_get_thread_id(void); #ifndef CONFIG_IOVEC +#include sys/types.h + struct iovec { void *iov_base; size_t iov_len; -- 1.8.1.4
Re: [Qemu-devel] [PATCH] osdep.h: include sys/types.h for ssize_t definition
On 10 May 2013 16:16, Igor Mitsyanko i.mitsya...@gmail.com wrote: This fixes build for mingw32 Signed-off-by: Igor Mitsyanko i.mitsya...@gmail.com --- include/qemu/osdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 42545bc..17946a3 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -163,6 +163,8 @@ int qemu_create_pidfile(const char *filename); int qemu_get_thread_id(void); #ifndef CONFIG_IOVEC +#include sys/types.h + This is quite a long way down to have a system #include. Can we just take the existing include of sys/types.h at the top of the file out of its current #ifdef __OpenBSD__ guard ? (http://hacks.owlfolio.org/header-survey/ has a full row of greens for sys/types.h so this should be safe.) thanks -- PMM
Re: [Qemu-devel] [PATCH] osdep.h: include sys/types.h for ssize_t definition
On 05/10/2013 07:24 PM, Peter Maydell wrote: On 10 May 2013 16:16, Igor Mitsyanko i.mitsya...@gmail.com wrote: This fixes build for mingw32 Signed-off-by: Igor Mitsyanko i.mitsya...@gmail.com --- include/qemu/osdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 42545bc..17946a3 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -163,6 +163,8 @@ int qemu_create_pidfile(const char *filename); int qemu_get_thread_id(void); #ifndef CONFIG_IOVEC +#include sys/types.h + This is quite a long way down to have a system #include. Can we just take the existing include of sys/types.h at the top of the file out of its current #ifdef __OpenBSD__ guard ? (http://hacks.owlfolio.org/header-survey/ has a full row of greens for sys/types.h so this should be safe.) thanks -- PMM Nice link. Long way, yes, but there's #include sys/uio.h even further down in this file. But I guess taking existing sys/types.h is still better, I'll resend it.