Skip to content

Commit fa193c6

Browse files
author
MarcoFalke
committed
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; ^~~
1 parent fa09ec8 commit fa193c6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/fs.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
#include <fs.h>
66

77
#ifndef WIN32
8+
#include <cstring>
89
#include <fcntl.h>
910
#include <string>
1011
#include <sys/file.h>
1112
#include <sys/utsname.h>
13+
#include <unistd.h>
1214
#else
1315
#ifndef NOMINMAX
1416
#define NOMINMAX
@@ -31,7 +33,8 @@ FILE *fopen(const fs::path& p, const char *mode)
3133

3234
#ifndef WIN32
3335

34-
static std::string GetErrorReason() {
36+
static std::string GetErrorReason()
37+
{
3538
return std::strerror(errno);
3639
}
3740

src/interfaces/chain.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <optional.h> // For Optional and nullopt
99
#include <primitives/transaction.h> // For CTransactionRef
1010

11+
#include <functional>
1112
#include <memory>
1213
#include <stddef.h>
1314
#include <stdint.h>

0 commit comments

Comments
 (0)