Should fix the GCC compilation portion of #29517 (comment).
See also: https://www.gnu.org/software/gnulib/manual/html_node/fopencookie.html.
Should fix the GCC compilation portion of #29517 (comment).
See also: https://www.gnu.org/software/gnulib/manual/html_node/fopencookie.html.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For detailed information about the code coverage, see the test coverage report.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
ACK | TheCharlatan |
Concept ACK | theuni |
Ignored review | m3dwards |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
ACK https://github.com/bitcoin/bitcoin/pull/29529/commits/a07206a82b809c5f59a9daa66192ac5f75541b2f
As it seems fopencookie
is only available for glibc
on linux it makes sense to add the __linux__
macro definition check.
Something we could look into another time is also using funopen
function which is roughly comparable to fopencookie
but works on BSD variants including MacOS.
Tested using FUZZ=buffered_file src/test/fuzz/fuzz
on Debian 12 x86.
Hmm, I’m not sure I’d trust the gnulib docs on this one. If nothing else, it seems to be supported on freebsd as well.. So I’d say either:
gnusource && (linux || freebsd)
gnusource && (!android && !openbsd)
So I’d say either:
I wanted to avoid having to pull this out into configure. So happy to just go with linux || freebsd. Sent up patch upstream that may get the gnulib docs fixed: https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00038.html.
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the documentation.
Possibly this is due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
Leave a comment here, if you need help tracking down a confusing failure.
So I’d say either:
I wanted to avoid having to pull this out into configure. So happy to just go with linux || freebsd. Sent up patch upstream that may get the gnulib docs fixed: https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00038.html.
Nice work! This has been accepted upstream.
Should fix the GCC compilation portion of #29517:
https://github.com/bitcoin/bitcoin/issues/29517#issuecomment-1973573314.
See also:
https://www.gnu.org/software/gnulib/manual/html_node/fopencookie.html
but note that FreeBSD has supported this function since 11.x.
I’m struggling to replicate the issue on OpenBSD as yes fopencookie
is not available in their version of libc but _GNU_SOURCE
also isn’t defined.
One caveat is that I wasn’t able to try OpenBSD on power pc and instead ran it on x86.
ACK https://github.com/bitcoin/bitcoin/pull/29529/commits/312f3381a2d3a7afb7c81b4662214d4d67b4e84a
As this shouldn’t cause harm and someone managed to hit the problem.