summaryrefslogtreecommitdiffstats
path: root/apphandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'apphandler.cpp')
-rw-r--r--apphandler.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/apphandler.cpp b/apphandler.cpp
index e69829f..05da67e 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -7,6 +7,17 @@
#include "types.hpp"
#include "utils.hpp"
+#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 <fstream>
#include <stdio.h>
#include <stdint.h>
@@ -16,7 +27,6 @@
#include <vector>
#include <string>
#include <cstddef>
-#include <experimental/filesystem>
#include <arpa/inet.h>
#include "transporthandler.hpp"
@@ -49,7 +59,7 @@ using namespace sdbusplus::xyz::openbmc_project::Common::Error;
using Version = sdbusplus::xyz::openbmc_project::Software::server::Version;
using Activation =
sdbusplus::xyz::openbmc_project::Software::server::Activation;
-namespace fs = std::experimental::filesystem;
+namespace fs = std::filesystem;
// Offset in get device id command.
typedef struct
OpenPOWER on IntegriCloud