mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
utils: drop strtok_r from envlist_parse
The problem is that mingw 4.9.1 fails to compile the code with the following warning: /mingw/include/string.h:88:9: note: previous declaration of 'strtok_r' was here char *strtok_r(char * __restrict__ _Str, const char * __restrict__ _Delim, char ** __restrict__ __last); /include/sysemu/os-win32.h:83:7: warning: redundant redeclaration of 'strtok_r' [-Wredundant-decls] char *strtok_r(char *str, const char *delim, char **saveptr); The problem is that compiles just fine on previous versions of mingw. Compiler version check here is not a good idea. Though fortunately strtok_r is used only once in the code and we could simply rewrite the code without it. Signed-off-by: Olga Krishtal <okrishtal@parallels.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Eric Blake <eblake@redhat.com> CC: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
parent
215a2771a7
commit
459db780be
2 changed files with 15 additions and 16 deletions
|
@ -81,7 +81,6 @@ 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) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue