From be2e16f33a5aef69263266aae8270f81e3adba8c Mon Sep 17 00:00:00 2001 From: fanquake Date: Sat, 4 Mar 2023 08:17:31 +0100 Subject: [PATCH] Merge bitcoin/bitcoin#27192: util: add missing include and fix function signature 8847ce44e0713350a6d3524f62eaeb10ba548bae util: add missing include and fix function signature (Cory Fields) Pull request description: ping hebasto Discovered while testing pre-compiled header support with CMake: https://github.com/theuni/bitcoin/commits/cmake-pch-poc. Compilation of that branch fails without this fix and succeeds with it. Similar to the fix in #27144. The problem of having a default argument in the definition was masked by the missing include. Using PCH forces that include, so we end up with the compiler error we should've been getting all along. ACKs for top commit: fanquake: ACK 8847ce44e0713350a6d3524f62eaeb10ba548bae Tree-SHA512: 5eb9a6691ee37cbc5033a48aedcbf5c93af3b234614ae14c3fcc858f1ee505f630ad68f8bbb69ffa280080c8d0f91451362cb3819290b741ce906b2b3224a622 --- src/util/readwritefile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/readwritefile.cpp b/src/util/readwritefile.cpp index a45c41d367..2493028f95 100644 --- a/src/util/readwritefile.cpp +++ b/src/util/readwritefile.cpp @@ -3,6 +3,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include + #include #include @@ -10,7 +12,7 @@ #include #include -std::pair ReadBinaryFile(const fs::path &filename, size_t maxsize=std::numeric_limits::max()) +std::pair ReadBinaryFile(const fs::path &filename, size_t maxsize) { FILE *f = fsbridge::fopen(filename, "rb"); if (f == nullptr)