summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-05-06 19:33:29 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-05-06 19:34:11 -0400
commitef1e2caf907ce57a3d0968a952295182d139f1dd (patch)
tree8b27a6cb21bbaea2a3150b41fee8f43d91e88f95
parentf976c98d334dce9ba30aa7da4427bb530aeea536 (diff)
downloadbfs-ef1e2caf907ce57a3d0968a952295182d139f1dd.tar.xz
xtime: Don't use timegm() on FreeBSD+msan
-rw-r--r--src/xtime.c4
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);