From f70b4258cdfd5d1d98e908dfc16fa15073d251ff Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Fri, 7 Jun 2024 03:40:07 +0000 Subject: [PATCH] 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 --- src/libutil/fmt.hh | 4 ++-- 1 file 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 #include #include -// 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