From: Stefan Weil <sw@weilnetz.de>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Stefan Weil <sw@weilnetz.de>
Subject: [Qemu-devel] [PATCH] util: Fix compilation of envlist.c for MinGW
Date: Wed, 16 Jan 2013 19:04:27 +0100 [thread overview]
Message-ID: <1358359467-16638-1-git-send-email-sw@weilnetz.de> (raw)
MinGW has no strtok_r, so we need a declaration in sysemu/os-win32.h.
We must also fix the include statements in util/envlist.c to include
that file.
We currently don't need an implementation of strtok_r because the
code is compiled but not linked for MinGW.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
include/sysemu/os-win32.h | 2 ++
util/envlist.c | 7 +------
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h
index d0e9234..bf9edeb 100644
--- a/include/sysemu/os-win32.h
+++ b/include/sysemu/os-win32.h
@@ -73,6 +73,8 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result);
#undef localtime_r
struct tm *localtime_r(const time_t *timep, struct tm *result);
+char *strtok_r(char *str, const char *delim, char **saveptr);
+
static inline void os_setup_signal_handling(void) {}
static inline void os_daemonize(void) {}
static inline void os_setup_post(void) {}
diff --git a/util/envlist.c b/util/envlist.c
index ff99fc4..ebc06cf 100644
--- a/util/envlist.c
+++ b/util/envlist.c
@@ -1,9 +1,4 @@
-#include <assert.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
+#include "qemu-common.h"
#include "qemu/queue.h"
#include "qemu/envlist.h"
--
1.7.10.4
next reply other threads:[~2013-01-16 18:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 18:04 Stefan Weil [this message]
2013-01-17 20:45 ` [Qemu-devel] [PATCH] util: Fix compilation of envlist.c for MinGW Blue Swirl
2013-01-17 20:54 ` Stefan Weil
2013-01-17 21:18 ` Blue Swirl
2013-01-18 8:36 ` Paolo Bonzini
2013-01-19 8:59 ` Blue Swirl
2013-02-03 16:15 ` Blue Swirl
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=1358359467-16638-1-git-send-email-sw@weilnetz.de \
--to=sw@weilnetz.de \
--cc=aliguori@us.ibm.com \
--cc=pbonzini@redhat.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).