Skip to content

Commit 96614ff

Browse files
committed
Merge bitcoin/bitcoin#33714: random: scope environ extern to macOS, BSDs and Illumos
79d6f45 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: hebasto/bitcoin-core-nightly#79. ACKs for top commit: l0rinc: ACK 79d6f45 hebasto: re-ACK 79d6f45. Tree-SHA512: dcaa15f0939d65a804107ceb110037f44d0ff70759f4d42fcc497a9c173ac28b1287b867f01732224788d1c1f9c883565bafc3abed3ccf28f1b67f23997ce3cf
2 parents 4e9bd57 + 79d6f45 commit 96614ff

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/randomenv.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,12 @@
5757
#include <sys/auxv.h>
5858
#endif
5959

60-
#ifndef WIN32
61-
extern char** environ; // NOLINT(readability-redundant-declaration): Necessary on some platforms
60+
#if defined(__APPLE__) || \
61+
defined(__FreeBSD__) || \
62+
defined(__NetBSD__) || \
63+
defined(__OpenBSD__) || \
64+
defined(__illumos__)
65+
extern char** environ; // NOLINT(readability-redundant-declaration): Necessary on the above platforms
6266
#endif
6367

6468
namespace {

0 commit comments

Comments
 (0)