diff options
author | Jan Beich <[email protected]> | 2024-12-18 19:15:44 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-12-19 19:26:40 +0000 |
commit | 9583429eaeb39241266596fa2f36e3ad6abc6e68 (patch) | |
tree | 380a169461bc12d8c1cc7a5d658d4351ec3aae28 | |
parent | 747c38112b69854d0e12ac10c8c7c3cc92a91a7c (diff) | |
download | Hyprland-9583429eaeb39241266596fa2f36e3ad6abc6e68.tar.gz Hyprland-9583429eaeb39241266596fa2f36e3ad6abc6e68.zip |
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 <[email protected]>
-rw-r--r-- | src/signal-safe.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 <unistd.h> #include <cstring> +// NOLINTNEXTLINE +extern "C" char** environ; + +// char const* sigGetenv(char const* name) { const size_t len = strlen(name); for (char** var = environ; *var != nullptr; var++) { |