qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for-1.5 2/2] w32: Include stdio.h to get the declara


From: Stefan Weil
Subject: [Qemu-devel] [PATCH for-1.5 2/2] w32: Include stdio.h to get the declaration of ssize_t
Date: Sat, 11 May 2013 21:46:59 +0200

Latest native MinGW and also the Debian squeeze cross version declare
ssize_t in sys/types.h which is not included by osdep.h. This results
in a compiler error for several files:

  CC    util/hbitmap.o
In file included from C:/qemu/util/hbitmap.c:15:0:
C:/qemu/include/qemu/osdep.h:175:1: error: unknown type name 'ssize_t'
C:/qemu/include/qemu/osdep.h:176:1: error: unknown type name 'ssize_t'
make: *** [util/hbitmap.o] Error 1

Including stdio.h is a trick which gets the necessary declaration in a
portable way. It also includes stdarg.h, so that include statement can
be safely removed.

Signed-off-by: Stefan Weil <address@hidden>
---
 include/qemu/osdep.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 42545bc..822512f 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -2,9 +2,9 @@
 #define QEMU_OSDEP_H
 
 #include "config-host.h"
-#include <stdarg.h>
 #include <stddef.h>
 #include <stdbool.h>
+#include <stdio.h>
 #ifdef __OpenBSD__
 #include <sys/types.h>
 #include <sys/signal.h>
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]