From 502502ae6eca745dab5dae8f153bac7bdfb25469 Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Wed, 2 Sep 2015 13:14:39 +0900 Subject: [PATCH] os-win32.h: Suppress warning -Wredundant-decls "time.h" in some distributions aleady has gmtime_r(), localtime_r() as a real function prototype (not a macro). So we should suppress warning "-Wredundnat-decls" for them. Change-Id: I8b2764d5c6d1b136b2a3dcc862d52b785d8a5855 Signed-off-by: SeokYeon Hwang --- include/sysemu/os-win32.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index af3fbc47d8..3d569a331c 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -76,12 +76,21 @@ int ffs(int i); /* Missing POSIX functions. Don't use MinGW-w64 macros. */ +// CONFIG_MARU MODIFICATION +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wredundant-decls" +#endif #undef gmtime_r 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); +#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE +#pragma GCC diagnostic pop +#endif + static inline void os_setup_signal_handling(void) {} static inline void os_daemonize(void) {} -- 2.34.1