From fa193c6b1b7da8f72a399bfddb1497655ce1685c Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 5 Jun 2020 16:11:36 -0400 Subject: [PATCH] Add missing includes to fix compile errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fs.cpp:35:17: error: no member named 'strerror' in namespace 'std' return std::strerror(errno); ~~~~~^ fs.cpp:49:9: error: use of undeclared identifier 'close' close(fd); ^ 2 errors generated. ./interfaces/chain.h:265:55: error: ‘std::function’ has not been declared virtual void rpcRunLater(const std::string& name, std::function fn, int64_t seconds) = 0; ^~~ --- src/fs.cpp | 5 ++++- src/interfaces/chain.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fs.cpp b/src/fs.cpp index e68c97b3caf..eef9c81de92 100644 --- a/src/fs.cpp +++ b/src/fs.cpp @@ -5,10 +5,12 @@ #include #ifndef WIN32 +#include #include #include #include #include +#include #else #ifndef NOMINMAX #define NOMINMAX @@ -31,7 +33,8 @@ FILE *fopen(const fs::path& p, const char *mode) #ifndef WIN32 -static std::string GetErrorReason() { +static std::string GetErrorReason() +{ return std::strerror(errno); } diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index 61d7ddb9340..65695707f75 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -8,6 +8,7 @@ #include // For Optional and nullopt #include // For CTransactionRef +#include #include #include #include