aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2024-03-01 14:31:11 -0500
committerfanquake <fanquake@gmail.com>2024-03-05 21:18:44 +0000
commit312f3381a2d3a7afb7c81b4662214d4d67b4e84a (patch)
tree842e50a921fdc1ab1a60d7a4765bb891fad285e0 /src
parent11a1db87806ca107bef58de66c3a72e62789f813 (diff)
fuzz: restrict fopencookie usage to Linux & FreeBSD
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.
Diffstat (limited to 'src')
-rw-r--r--src/test/fuzz/util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/util.cpp b/src/test/fuzz/util.cpp
index 23b0761355..259b00fcae 100644
--- a/src/test/fuzz/util.cpp
+++ b/src/test/fuzz/util.cpp
@@ -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,