aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorArtemis Tosini <lix@artem.ist>2024-06-07 03:40:07 +0000
committerArtemis Tosini <me@artem.ist>2024-06-16 03:41:15 +0000
commitf70b4258cdfd5d1d98e908dfc16fa15073d251ff (patch)
treec66c12da2d96b9e671e0f3b6e92350cd0eda7e6a /src/libutil
parente680b0913aa39519b8b5200b8dd459b0315e0f2b (diff)
libutil: Set boost defines for FreeBSD
FreeBSD uses libunwind unwind.h, which does not require `_GNU_SOURCE` to expose `_Unwind_Backtrace`. Tell Boost that. Change-Id: I81e767967b1458118b86d212b5552d4d0a1200d9
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/fmt.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/fmt.hh b/src/libutil/fmt.hh
index df4492993..d015f7e5f 100644
--- a/src/libutil/fmt.hh
+++ b/src/libutil/fmt.hh
@@ -5,8 +5,8 @@
#include <string>
#include <optional>
#include <boost/format.hpp>
-// Darwin stdenv does not define _GNU_SOURCE but does have _Unwind_Backtrace.
-#ifdef __APPLE__
+// Darwin and FreeBSD stdenv do not define _GNU_SOURCE but do have _Unwind_Backtrace.
+#if __APPLE__ || __FreeBSD__
#define BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
#endif
#include <boost/stacktrace.hpp>