summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-11-30 15:35:20 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-11-30 15:35:20 +0000
commit680617ed43a2811318ac2df63e686f6b7bc22f55 (patch)
tree403f9a5769dbb45a40bf46b3decb40868390a840
parent714487515dbe0c65d5904251e796cd3a5b3579fb (diff)
parent78e9d4ad11e7116376328860a58b96765ade7b62 (diff)
downloadhqemu-680617ed43a2811318ac2df63e686f6b7bc22f55.zip
hqemu-680617ed43a2811318ac2df63e686f6b7bc22f55.tar.gz
Merge remote-tracking branch 'remotes/weil/tags/pull-wxx-20151130' into staging
wxx patch queue # gpg: Signature made Mon 30 Nov 2015 05:48:33 GMT using RSA key ID 677450AD # gpg: Good signature from "Stefan Weil <sw@weilnetz.de>" # gpg: aka "Stefan Weil <stefan.weil@weilnetz.de>" # gpg: aka "Stefan Weil <stefan.weil@bib.uni-mannheim.de>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 4923 6FEA 75C9 5D69 8EC2 B78A E08C 21D5 6774 50AD * remotes/weil/tags/pull-wxx-20151130: w32: Use gcc option -mthreads oslib-win32: Change return type of function getpagesize trace/simple: Fix warning and wrong trace file name for MinGW Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-xconfigure2
-rw-r--r--include/sysemu/os-win32.h2
-rw-r--r--trace/simple.c3
-rw-r--r--util/oslib-win32.c2
4 files changed, 6 insertions, 3 deletions
diff --git a/configure b/configure
index 979bc55..67801b0 100755
--- a/configure
+++ b/configure
@@ -727,6 +727,8 @@ if test "$mingw32" = "yes" ; then
QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
# enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
+ # MinGW needs -mthreads for TLS and macro _MT.
+ QEMU_CFLAGS="-mthreads $QEMU_CFLAGS"
LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
write_c_skeleton;
if compile_prog "" "-liberty" ; then
diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h
index 13dcef6..400e098 100644
--- a/include/sysemu/os-win32.h
+++ b/include/sysemu/os-win32.h
@@ -87,7 +87,7 @@ static inline void os_setup_post(void) {}
void os_set_line_buffering(void);
static inline void os_set_proc_name(const char *dummy) {}
-size_t getpagesize(void);
+int getpagesize(void);
#if !defined(EPROTONOSUPPORT)
# define EPROTONOSUPPORT EINVAL
diff --git a/trace/simple.c b/trace/simple.c
index 11ad030..56a624c 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -329,7 +329,8 @@ bool st_set_trace_file(const char *file)
g_free(trace_file_name);
if (!file) {
- trace_file_name = g_strdup_printf(CONFIG_TRACE_FILE, getpid());
+ /* Type cast needed for Windows where getpid() returns an int. */
+ trace_file_name = g_strdup_printf(CONFIG_TRACE_FILE, (pid_t)getpid());
} else {
trace_file_name = g_strdup_printf("%s", file);
}
diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index 09f9e98..6a47019 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -454,7 +454,7 @@ gint g_poll(GPollFD *fds, guint nfds, gint timeout)
return retval;
}
-size_t getpagesize(void)
+int getpagesize(void)
{
SYSTEM_INFO system_info;
OpenPOWER on IntegriCloud