diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-05-06 19:33:29 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-05-06 19:34:11 -0400 |
commit | ef1e2caf907ce57a3d0968a952295182d139f1dd (patch) | |
tree | 8b27a6cb21bbaea2a3150b41fee8f43d91e88f95 | |
parent | f976c98d334dce9ba30aa7da4427bb530aeea536 (diff) | |
download | bfs-ef1e2caf907ce57a3d0968a952295182d139f1dd.tar.xz |
xtime: Don't use timegm() on FreeBSD+msan
-rw-r--r-- | src/xtime.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 <errno.h> #include <limits.h> #include <sys/time.h> @@ -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); |