mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-19 16:30:50 +02:00
Add missing includes to fix compile errors
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<void()> fn, int64_t seconds) = 0; ^~~
This commit is contained in:
parent
fa09ec83f3
commit
fa193c6b1b
@ -5,10 +5,12 @@
|
|||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
#include <cstring>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
|
#include <unistd.h>
|
||||||
#else
|
#else
|
||||||
#ifndef NOMINMAX
|
#ifndef NOMINMAX
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
@ -31,7 +33,8 @@ FILE *fopen(const fs::path& p, const char *mode)
|
|||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|
||||||
static std::string GetErrorReason() {
|
static std::string GetErrorReason()
|
||||||
|
{
|
||||||
return std::strerror(errno);
|
return std::strerror(errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <optional.h> // For Optional and nullopt
|
#include <optional.h> // For Optional and nullopt
|
||||||
#include <primitives/transaction.h> // For CTransactionRef
|
#include <primitives/transaction.h> // For CTransactionRef
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user