From ef1e2caf907ce57a3d0968a952295182d139f1dd Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 6 May 2024 19:33:29 -0400 Subject: xtime: Don't use timegm() on FreeBSD+msan --- src/xtime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/xtime.c b/src/xtime.c index c3537e7..eb11afa 100644 --- a/src/xtime.c +++ b/src/xtime.c @@ -5,6 +5,7 @@ #include "xtime.h" #include "bfstd.h" #include "diag.h" +#include "sanity.h" #include #include #include @@ -34,7 +35,8 @@ int xmktime(struct tm *tm, time_t *timep) { return 0; } -#if BFS_HAS_TIMEGM +// FreeBSD is missing an interceptor +#if BFS_HAS_TIMEGM && !(__FreeBSD__ && SANITIZE_MEMORY) int xtimegm(struct tm *tm, time_t *timep) { time_t time = timegm(tm); -- cgit v1.2.3