Skip to content

Commit

Permalink
fuzz: restrict fopencookie usage to Linux & FreeBSD
Browse files Browse the repository at this point in the history
Should fix the GCC compilation portion of bitcoin#29517:
bitcoin#29517 (comment).

See also:
https://www.gnu.org/software/gnulib/manual/html_node/fopencookie.html
but note that FreeBSD has supported this function since 11.x.
  • Loading branch information
fanquake committed Mar 5, 2024
1 parent 11a1db8 commit 312f338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/fuzz/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ FILE* FuzzedFileProvider::open()
[&] {
mode = "a+";
});
#if defined _GNU_SOURCE && !defined __ANDROID__
#if defined _GNU_SOURCE && (defined(__linux__) || defined(__FreeBSD__))
const cookie_io_functions_t io_hooks = {
FuzzedFileProvider::read,
FuzzedFileProvider::write,
Expand Down

0 comments on commit 312f338

Please sign in to comment.