qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Stefan Weil <sw@weilnetz.de>, qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <1368301619-32097-3-git-send-email-sw@weilnetz.de> (raw)
In-Reply-To: <1368301619-32097-1-git-send-email-sw@weilnetz.de>

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 <sw@weilnetz.de>
---
 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

  parent reply	other threads:[~2013-05-11 19:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-11 19:46 [Qemu-devel] [PATCH for-1.5 0/2] Stefan Weil
2013-05-11 19:46 ` [Qemu-devel] [PATCH for-1.5 1/2] w32: Fix configure test for -march=i486 Stefan Weil
2013-05-14 18:20   ` Stefan Weil
2013-05-11 19:46 ` Stefan Weil [this message]
2013-05-16 12:50 ` [Qemu-devel] [PATCH for-1.5 0/2] Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1368301619-32097-3-git-send-email-sw@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).