os-win32.h: Suppress warning -Wredundant-decls
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 2 Sep 2015 04:14:39 +0000 (13:14 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 2 Sep 2015 04:14:39 +0000 (13:14 +0900)
"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 <syeon.hwang@samsung.com>
include/sysemu/os-win32.h

index 4035c4f..de356e3 100644 (file)
 #define siglongjmp(env, val) longjmp(env, val)
 
 /* 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);
+#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
+#pragma GCC diagnostic pop
+#endif
 
 
 static inline void os_setup_signal_handling(void) {}