From 9583429eaeb39241266596fa2f36e3ad6abc6e68 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Wed, 18 Dec 2024 19:15:44 +0000 Subject: [PATCH] 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 2f377bf70..baee7b44b 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++) {