]> git.proxmox.com Git - qemu.git/commitdiff
util: Fix compilation of envlist.c for MinGW
authorStefan Weil <sw@weilnetz.de>
Wed, 16 Jan 2013 18:04:27 +0000 (19:04 +0100)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 2 Feb 2013 20:13:19 +0000 (20:13 +0000)
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>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
include/sysemu/os-win32.h
util/envlist.c

index d0e9234d24c92c9c3b9f7cd199e2faa79cc5ea26..bf9edeb9ab39e86d51f2da275bccdd97184e9cb8 100644 (file)
@@ -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) {}
index ff99fc44e97329e6bd8f0ea19b7ea26503d62830..ebc06cf0f3f1ad4a26e68d61064ebb581b39dc4d 100644 (file)
@@ -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"