From febc345414e8600314375a82de591a7928066c6b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 4 Oct 2023 23:34:40 +0200 Subject: [PATCH] Fix superclock init on Windows Static global symbols on windows (even identical symbols) are not mapped to the same address when mixing .dll + .exe. see also d3cd621f7ad --- libs/temporal/superclock.cc | 2 +- libs/temporal/temporal/superclock.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/temporal/superclock.cc b/libs/temporal/superclock.cc index 59794fdb99..8ec8682ec4 100644 --- a/libs/temporal/superclock.cc +++ b/libs/temporal/superclock.cc @@ -18,7 +18,7 @@ #include "temporal/superclock.h" -#ifndef COMPILER_MSVC +#ifndef PLATFORM_WINDOWS Temporal::superclock_t Temporal::_superclock_ticks_per_second = 0; #endif diff --git a/libs/temporal/temporal/superclock.h b/libs/temporal/temporal/superclock.h index d4a9e4d9d1..53376cd6f6 100644 --- a/libs/temporal/temporal/superclock.h +++ b/libs/temporal/temporal/superclock.h @@ -34,7 +34,7 @@ namespace Temporal { typedef int64_t superclock_t; -#ifndef COMPILER_MSVC +#ifndef PLATFORM_WINDOWS extern superclock_t _superclock_ticks_per_second; #else static superclock_t _superclock_ticks_per_second = 0;