From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvXLl-0006F9-5j for qemu-devel@nongnu.org; Wed, 16 Jan 2013 13:04:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvXLi-0001Sj-Ki for qemu-devel@nongnu.org; Wed, 16 Jan 2013 13:04:33 -0500 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:40021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvXLi-0001Sb-Ec for qemu-devel@nongnu.org; Wed, 16 Jan 2013 13:04:30 -0500 From: Stefan Weil Date: Wed, 16 Jan 2013 19:04:27 +0100 Message-Id: <1358359467-16638-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH] util: Fix compilation of envlist.c for MinGW List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paolo Bonzini , qemu-devel@nongnu.org, 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 --- 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 -#include -#include -#include -#include - +#include "qemu-common.h" #include "qemu/queue.h" #include "qemu/envlist.h" -- 1.7.10.4