From 646f5b1be82a954821612cc8b60850a8b5bbd0a4 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 21 Oct 2023 22:02:02 +1100 Subject: [PATCH] [host] fix windows compilation with mingw clang --- common/include/common/time.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/include/common/time.h b/common/include/common/time.h index 20417757..403f9ed4 100644 --- a/common/include/common/time.h +++ b/common/include/common/time.h @@ -39,7 +39,7 @@ typedef struct LGTimer LGTimer; static inline uint64_t microtime(void) { #if defined(_WIN32) - static LARGE_INTEGER freq = { 0 }; + static LARGE_INTEGER freq = { .QuadPart = 0LL }; if (!freq.QuadPart) QueryPerformanceFrequency(&freq); @@ -74,7 +74,7 @@ static inline uint64_t nanotime(void) static double multiplier = 0.0; if (!multiplier) { - LARGE_INTEGER freq = { 0 }; + LARGE_INTEGER freq = { .QuadPart = 0LL }; QueryPerformanceFrequency(&freq); multiplier = 1e9 / freq.QuadPart; }