remove std::experimental usage
C++17 moved this support out of std::experimental and into std
directly. Fix up the code and dependencies to reflect this.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I1cd852831fc2608bd3a36f047aa6ac14741da270
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp
index afdf062..2d641af 100644
--- a/user_channel/channel_mgmt.cpp
+++ b/user_channel/channel_mgmt.cpp
@@ -27,7 +27,7 @@
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <cerrno>
#include <exception>
-#include <experimental/filesystem>
+#include <filesystem>
#include <fstream>
#include <phosphor-logging/log.hpp>
#include <sdbusplus/bus/match.hpp>
@@ -1451,8 +1451,8 @@
if (readChannelPersistData() != 0)
{
// Copy default NV data to RW location
- std::experimental::filesystem::copy_file(channelAccessDefaultFilename,
- channelNvDataFilename);
+ std::filesystem::copy_file(channelAccessDefaultFilename,
+ channelNvDataFilename);
// Load the channel access NV data
if (readChannelPersistData() != 0)
@@ -1469,8 +1469,8 @@
{
// Copy default volatile data to temporary location
// NV file(channelNvDataFilename) must have created by now.
- std::experimental::filesystem::copy_file(channelNvDataFilename,
- channelVolatileDataFilename);
+ std::filesystem::copy_file(channelNvDataFilename,
+ channelVolatileDataFilename);
// Load the channel access volatile data
if (readChannelVolatileData() != 0)
diff --git a/user_channel/file.hpp b/user_channel/file.hpp
index 2c537b1..76a03c7 100644
--- a/user_channel/file.hpp
+++ b/user_channel/file.hpp
@@ -2,13 +2,13 @@
#include <stdio.h>
-#include <experimental/filesystem>
+#include <filesystem>
namespace phosphor
{
namespace user
{
-namespace fs = std::experimental::filesystem;
+namespace fs = std::filesystem;
/** @class File
* @brief Responsible for handling file pointer
diff --git a/user_channel/meson.build b/user_channel/meson.build
index eec8b82..bc1ea2f 100644
--- a/user_channel/meson.build
+++ b/user_channel/meson.build
@@ -8,7 +8,6 @@
nlohmann_json_dep,
phosphor_dbus_interfaces_dep,
phosphor_logging_dep,
- std_cpp_fs,
systemd,
])
@@ -43,7 +42,6 @@
pam,
phosphor_dbus_interfaces_dep,
phosphor_logging_dep,
- std_cpp_fs,
systemd,
])