aboutsummaryrefslogtreecommitdiff
path: root/src/fs.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-06-05 16:11:36 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-06-16 15:15:46 -0400
commitfa193c6b1b7da8f72a399bfddb1497655ce1685c (patch)
tree0123bb699d40d2de7fb9e5f9457825f2d4d2209b /src/fs.cpp
parentfa09ec83f3f23dacb807c6b6393cabf2a984e4ff (diff)
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; ^~~
Diffstat (limited to 'src/fs.cpp')
-rw-r--r--src/fs.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fs.cpp b/src/fs.cpp
index e68c97b3ca..eef9c81de9 100644
--- a/src/fs.cpp
+++ b/src/fs.cpp
@@ -5,10 +5,12 @@
#include <fs.h>
#ifndef WIN32
+#include <cstring>
#include <fcntl.h>
#include <string>
#include <sys/file.h>
#include <sys/utsname.h>
+#include <unistd.h>
#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);
}