mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-26 20:29:49 +01:00
core: Unbreak build on FreeBSD (#8762)
* CrashReporter: restore explicit environ(7) after 8bbeee1173
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 <vaxry@vaxry.net>
This commit is contained in:
parent
747c38112b
commit
9583429eae
1 changed files with 4 additions and 0 deletions
|
@ -7,6 +7,10 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE
|
||||||
|
extern "C" char** environ;
|
||||||
|
|
||||||
|
//
|
||||||
char const* sigGetenv(char const* name) {
|
char const* sigGetenv(char const* name) {
|
||||||
const size_t len = strlen(name);
|
const size_t len = strlen(name);
|
||||||
for (char** var = environ; *var != nullptr; var++) {
|
for (char** var = environ; *var != nullptr; var++) {
|
||||||
|
|
Loading…
Reference in a new issue