random: scope environ extern to macOS, BSDs and Illumos

These platforms fail to compile with it removed.
This commit is contained in:
fanquake committed 2025-10-29 15:13:56 +00:00
1 parent 292ea0eb89
commit 79d6f458e2
1 file changed
+6 -2
+6 -2
View File
@@ -57,8 +57,12 @@
#include <sys/auxv.h>
#endif
#ifndef WIN32
extern char** environ; // NOLINT(readability-redundant-declaration): Necessary on some platforms
#if defined(__APPLE__) || \
defined(__FreeBSD__) || \
defined(__NetBSD__) || \
defined(__OpenBSD__) || \
defined(__illumos__)
extern char** environ; // NOLINT(readability-redundant-declaration): Necessary on the above platforms
#endif
namespace {