diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/osdep.h | 4 | ||||
-rw-r--r-- | include/qemu/thread-win32.h | 1 | ||||
-rw-r--r-- | include/sysemu/os-win32.h | 2 | ||||
-rw-r--r-- | include/ui/gtk.h | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index ab3c8766b4..ef21efb683 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -38,10 +38,12 @@ #include <strings.h> #include <inttypes.h> #include <limits.h> +/* Put unistd.h before time.h as that triggers localtime_r/gmtime_r + * function availability on recentish Mingw-w64 platforms. */ +#include <unistd.h> #include <time.h> #include <ctype.h> #include <errno.h> -#include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/time.h> diff --git a/include/qemu/thread-win32.h b/include/qemu/thread-win32.h index 3d58081bed..385ff5f76a 100644 --- a/include/qemu/thread-win32.h +++ b/include/qemu/thread-win32.h @@ -18,6 +18,7 @@ struct QemuSemaphore { }; struct QemuEvent { + int value; HANDLE event; }; diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index 706d85a98e..13dcef6b4c 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -73,10 +73,12 @@ #define siglongjmp(env, val) longjmp(env, val) /* Missing POSIX functions. Don't use MinGW-w64 macros. */ +#ifndef CONFIG_LOCALTIME_R #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); +#endif /* CONFIG_LOCALTIME_R */ static inline void os_setup_signal_handling(void) {} diff --git a/include/ui/gtk.h b/include/ui/gtk.h index ee6dffd306..0359333fce 100644 --- a/include/ui/gtk.h +++ b/include/ui/gtk.h @@ -1,10 +1,6 @@ #ifndef UI_GTK_H #define UI_GTK_H -#ifdef _WIN32 -# define _WIN32_WINNT 0x0601 /* needed to get definition of MAPVK_VK_TO_VSC */ -#endif - #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE /* Work around an -Wstrict-prototypes warning in GTK headers */ #pragma GCC diagnostic push |