Merge bitcoin/bitcoin#33714: random: scope environ extern to macOS, BSDs and Illumos

79d6f458e2300e1f47b94467cda233e1c761f8be random: scope environ extern to macOS, BSDs and Illumos (fanquake)

Pull request description:

  These platforms fail to compile with it removed.
  macOS: #33675
  BSDs / Illumos: https://github.com/hebasto/bitcoin-core-nightly/pull/79.

ACKs for top commit:
  l0rinc:
    ACK 79d6f458e2300e1f47b94467cda233e1c761f8be
  hebasto:
    re-ACK 79d6f458e2300e1f47b94467cda233e1c761f8be.

Tree-SHA512: dcaa15f0939d65a804107ceb110037f44d0ff70759f4d42fcc497a9c173ac28b1287b867f01732224788d1c1f9c883565bafc3abed3ccf28f1b67f23997ce3cf
This commit is contained in:
Hennadii Stepanov 2025-11-04 15:09:58 +00:00
commit 96614fff63
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

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 {