osdep.h: include sys/types.h for ssize_t definition
PATCH 1/1 osdep.h: include sys/types.h for ssize_t definition
This fixes build for mingw32
--- include/qemu/osdep.h | 2 ++ 1 file changed, 2 insertions(+)
include/qemu/osdep.h +2 -0
@@ -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;
Signature · 1 line
1.8.1.4
Quoted 12 lines · Igor Mitsyanko
This fixes build for mingw32
Signed-off-by Igor Mitsyanko <[email protected]>--- include/qemu/osdep.h | 2 ++ 1 file changed, 2 insertions(+)include/qemu/osdep.h +0
-0
include/qemu/osdep.h int qemu_create_pidfile(const char *filename); · line 167
Quoted 5 lines
include/qemu/osdep.h +2
-0@@ -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
Quoted 24 lines · Peter Maydell
Quoted 12 lines · Igor Mitsyanko
This fixes build for mingw32
Signed-off-by Igor Mitsyanko <[email protected]>--- include/qemu/osdep.h | 2 ++ 1 file changed, 2 insertions(+)include/qemu/osdep.h +0
-0include/qemu/osdep.h int qemu_create_pidfile(const char *filename); · line 167
Quoted 5 lines
include/qemu/osdep.h +2
-0@@ -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.hat the top of the file out of its current #ifdef__OpenBSD__guard ?
Quoted 5 lines
(http://hacks.owlfolio.org/header-survey/ has a full row of greens for
sys/types.hso 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.