From d3c493d637f02683e3a843655caba575a451d262 Mon Sep 17 00:00:00 2001 From: Scott Mcdermott Date: Wed, 27 Aug 2025 10:51:20 -0700 Subject: [PATCH] Fix timegm() to use HAVE_TIMEGM from cmake so it uses libc version There is a preprocessor define to use the system version of timegm() rather than a [slow] fallback function implemented in libshared. The function Datetime::timegm() conditionally manifests if said define is unset, but the code won't actually consult the value (provided by cmake), unless we include the cmake header. (This function is only used by Timewarrior, so Taskwarrior need not peg to a new libshared just for this fix.) --- src/Datetime.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Datetime.h b/src/Datetime.h index 5895ca3..265ae8b 100644 --- a/src/Datetime.h +++ b/src/Datetime.h @@ -32,6 +32,8 @@ #include #include +#include "cmake.h" + #define EPOCH_MIN_VALUE 315532800 // 1980-01-01T00:00:00Z #define EPOCH_MAX_VALUE 253402293599 // 9999-12-31, 23:59:59 AoE