random: scope environ extern to macOS, BSDs and Illumos #33714
pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:drop_some_platforms changing 1 files +6 −2-
fanquake commented at 4:38 pm on October 27, 2025: memberThese platforms fail to compile with it removed. macOS: #33675 BSDs / Illumos: https://github.com/hebasto/bitcoin-core-nightly/pull/79.
-
DrahtBot added the label Utils/log/libs on Oct 27, 2025
-
DrahtBot commented at 4:38 pm on October 27, 2025: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33714.
Reviews
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
-
hebasto approved
-
hebasto commented at 4:44 pm on October 27, 2025: memberACK f24ef2b4e01884ac1dea07ebbc7e7d0aa2c09541.
-
in src/randomenv.cpp:60 in f24ef2b4e0
57@@ -58,7 +58,7 @@ 58 #endif 59 60 #ifndef WIN32
l0rinc commented at 7:47 pm on October 27, 2025:If it’s only needed on Mac, wouldn’t:
0#ifdef __APPLE__be better here?
fanquake commented at 5:47 pm on October 28, 2025:I’m not 100% sure that is the only place it’s needed, however this has historically been unclear, and the only platform I’m aware of that definitely needs it, is macOS.fanquake force-pushed on Oct 28, 2025fanquake renamed this:
random: clarify where the environ extern is needed
random: scope the environ extern to macOS
on Oct 28, 2025DrahtBot renamed this:
random: scope the environ extern to macOS
random: scope the environ extern to macOS
on Oct 28, 2025hebasto commented at 7:58 pm on October 28, 2025: memberTesting on some other platforms: https://github.com/hebasto/bitcoin-core-nightly/pull/79.hebasto commented at 0:52 am on October 29, 2025: memberTesting on some other platforms: hebasto/bitcoin-core-nightly#79.
Builds on the *BSD and illumos systems failed.
fanquake force-pushed on Oct 29, 2025fanquake renamed this:
random: scope the environ extern to macOS
random: scope environ extern to macOS, BSDs and Illumos
on Oct 29, 2025in src/randomenv.cpp:61 in fcdbce4a04 outdated
56@@ -57,8 +57,12 @@ 57 #include <sys/auxv.h> 58 #endif 59 60-#ifndef WIN32 61-extern char** environ; // NOLINT(readability-redundant-declaration): Necessary on some platforms
maflcko commented at 12:52 pm on October 29, 2025:nit: I think the comment can be kept as-is, or just refer to “Necessary on the above platforms”. Otherwise, it is just one more line to maintain.
Also, I wonder if this can just be checked at configure-time, but no strong opinion.
fanquake commented at 3:14 pm on October 29, 2025:Re-modified the comment. Not sure there is too much value in moving this to configure.
maflcko commented at 5:34 pm on November 4, 2025:Actually, theNOLINTwas fixed and can be removed? You’ve confirmed that it is undeclared on the listed platforms, so it can’t be hit byreadability-redundant-declaration
hebasto approvedhebasto commented at 1:41 pm on October 29, 2025: memberACK fcdbce4a040e4a40aac9ed5ef8634b09d092063e.79d6f458e2random: scope environ extern to macOS, BSDs and Illumos
These platforms fail to compile with it removed.
fanquake force-pushed on Oct 29, 2025hebasto approvedhebasto commented at 5:13 pm on November 3, 2025: memberre-ACK 79d6f458e2300e1f47b94467cda233e1c761f8be.fanquake requested review from l0rinc on Nov 4, 2025hebasto merged this on Nov 4, 2025hebasto closed this on Nov 4, 2025
fanquake deleted the branch on Nov 4, 2025
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-11-21 21:13 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-11-21 21:13 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me