From 8f8a6ee2a02102c989db42d781a7e1afac6781ef Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 10 Jul 2023 10:51:02 +0200 Subject: [PATCH] Application::m_LastReloadFailed: if double isn't always lock free, use uint32_t which will overflow in 2106, not 2038. This fixes a compile failure on 32-bit Raspbian. --- lib/base/application.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/base/application.hpp b/lib/base/application.hpp index 0578b8aa8..f45c8bdd7 100644 --- a/lib/base/application.hpp +++ b/lib/base/application.hpp @@ -9,7 +9,9 @@ #include "base/logger.hpp" #include "base/configuration.hpp" #include "base/shared-memory.hpp" +#include #include +#include namespace icinga { @@ -142,7 +144,7 @@ private: #ifdef _WIN32 static double m_LastReloadFailed; #else /* _WIN32 */ - typedef Atomic AtomicTs; + typedef Atomic::is_always_lock_free, double, uint32_t>> AtomicTs; static_assert(AtomicTs::is_always_lock_free); static SharedMemory m_LastReloadFailed; #endif /* _WIN32 */