diff options
author | fanquake <fanquake@gmail.com> | 2024-03-01 14:31:11 -0500 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2024-03-07 10:45:14 +0000 |
commit | fce992b38e59c90babe505eda0d72f05d79eb2f3 (patch) | |
tree | 2b6cf257127e088e12c3d99d6e607612f20ed30c | |
parent | 40c56a4d1341017b02dcb71882b1b1f03f880b1d (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.
Github-Pull: #29529
Rebased-From: 312f3381a2d3a7afb7c81b4662214d4d67b4e84a
-rw-r--r-- | src/test/fuzz/util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/util.cpp b/src/test/fuzz/util.cpp index 87ca2f6aed..db73c19735 100644 --- a/src/test/fuzz/util.cpp +++ b/src/test/fuzz/util.cpp @@ -255,7 +255,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, |