From df06cb4d71a291171c02467c384471f90832d23b Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Wed, 18 Dec 2024 19:15:44 +0000 Subject: core: Unbreak build on FreeBSD (#8762) * CrashReporter: restore explicit environ(7) after 8bbeee11734d BSD systems don't declare environ(7) in any header like POSIX suggests. src/signal-safe.cpp:12:23: error: use of undeclared identifier 'environ' 12 | for (char** var = environ; *var != nullptr; var++) { | ^ * fix --------- Co-authored-by: Vaxry --- src/signal-safe.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/signal-safe.cpp b/src/signal-safe.cpp index 2f377bf7..baee7b44 100644 --- a/src/signal-safe.cpp +++ b/src/signal-safe.cpp @@ -7,6 +7,10 @@ #include #include +// NOLINTNEXTLINE +extern "C" char** environ; + +// char const* sigGetenv(char const* name) { const size_t len = strlen(name); for (char** var = environ; *var != nullptr; var++) { -- cgit v1.2.3