summaryrefslogtreecommitdiffstats
path: root/src/bfstd.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-05-15 16:07:05 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-05-16 11:42:26 -0400
commit5e8a7a882eb056f7fc02736f2e92547f269ee553 (patch)
tree8fb9556cff85ad150963db2fd13cf7fbc91901bf /src/bfstd.c
parent5fd4fa21d3852525096ceaa5ac4f64d78ac99de7 (diff)
downloadbfs-5e8a7a882eb056f7fc02736f2e92547f269ee553.tar.xz
Work around https://github.com/llvm/llvm-project/issues/88163
Diffstat (limited to 'src/bfstd.c')
-rw-r--r--src/bfstd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/bfstd.c b/src/bfstd.c
index 0ac3a72..7680f17 100644
--- a/src/bfstd.c
+++ b/src/bfstd.c
@@ -671,6 +671,21 @@ int xstrtofflags(const char **str, unsigned long long *set, unsigned long long *
#endif
}
+long xsysconf(int name) {
+#if __FreeBSD__ && SANITIZE_MEMORY
+ // Work around https://github.com/llvm/llvm-project/issues/88163
+ __msan_scoped_disable_interceptor_checks();
+#endif
+
+ long ret = sysconf(name);
+
+#if __FreeBSD__ && SANITIZE_MEMORY
+ __msan_scoped_enable_interceptor_checks();
+#endif
+
+ return ret;
+}
+
size_t asciilen(const char *str) {
return asciinlen(str, strlen(str));
}