bmcweb: Replace deprecated boost call
The boost::asio::io_context::post() is deprecated and will not build
when boost library is version 1.71.0.
See CMakeLists.txt
271 if ("${Boost_VERSION}" STREQUAL "107100")
272 add_definitions (-DBOOST_ASIO_NO_DEPRECATED)
273 endif ()
Signed-off-by: Zhenfei Tai <ztai@google.com>
Change-Id: Iacd657af320ba6eebb1518cd86a955f355ed5068
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index fa072a7..2f86a6a 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -17,6 +17,7 @@
#include "node.hpp"
+#include <boost/asio.hpp>
#include <boost/container/flat_map.hpp>
#include <chrono>
#include <variant>
@@ -182,7 +183,8 @@
self->finishTask();
// reset the match after the callback was successful
- crow::connections::systemBus->get_io_context().post(
+ boost::asio::post(
+ crow::connections::systemBus->get_io_context(),
[self] { self->match.reset(); });
return;
}