summaryrefslogtreecommitdiffstats
path: root/storagehandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storagehandler.cpp')
-rw-r--r--storagehandler.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/storagehandler.cpp b/storagehandler.cpp
index c020948..f0997e8 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -2,7 +2,17 @@
#include <arpa/inet.h>
#include <chrono>
#include <cstdio>
+#if __has_include(<filesystem>)
+#include <filesystem>
+#elif __has_include(<experimental/filesystem>)
#include <experimental/filesystem>
+namespace std {
+ // splice experimental::filesystem into std
+ namespace filesystem = std::experimental::filesystem;
+}
+#else
+# error filesystem not available
+#endif
#include <mapper.h>
#include <string>
#include <systemd/sd-bus.h>
@@ -203,7 +213,7 @@ ipmi_ret_t getSELEntry(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
}
else
{
- namespace fs = std::experimental::filesystem;
+ namespace fs = std::filesystem;
fs::path path(*iter);
record.nextRecordID = static_cast<uint16_t>
(std::stoul(std::string(path.filename().c_str())));
OpenPOWER on IntegriCloud