qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] util: Fix compilation of envlist.c for MinGW
@ 2013-01-16 18:04 Stefan Weil
  2013-01-17 20:45 ` Blue Swirl
  2013-02-03 16:15 ` Blue Swirl
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Weil @ 2013-01-16 18:04 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Paolo Bonzini, qemu-devel, Stefan Weil

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-02-03 16:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16 18:04 [Qemu-devel] [PATCH] util: Fix compilation of envlist.c for MinGW Stefan Weil
2013-01-17 20:45 ` 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

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).