From 0d89fdfc83be0be8d5211f2c25f6966aa14482eb Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Mon, 25 May 2020 20:49:51 +0200 Subject: [HICN-616] Fix compilation issue with asio 1.16. Change-Id: Id9af4820dae5ccbb9a5f41d604ede10958f30b69 Signed-off-by: Mauro Sardara --- apps/http-proxy/src/http_session.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/http-proxy/src/http_session.cc b/apps/http-proxy/src/http_session.cc index 2c281468f..ff5063617 100644 --- a/apps/http-proxy/src/http_session.cc +++ b/apps/http-proxy/src/http_session.cc @@ -51,7 +51,12 @@ HTTPSession::HTTPSession(asio::ip::tcp::socket socket, ContentReceivedCallback receive_callback, OnConnectionClosed on_connection_closed_callback, bool reverse) - : io_service_(socket.get_io_service()), + : +#if ((ASIO_VERSION / 100 % 1000) < 12) + io_service_(socket.get_io_service()), +#else + io_service_((asio::io_context &)(socket.get_executor().context())), +#endif socket_(std::move(socket)), resolver_(io_service_), timer_(io_service_), -- cgit 1.2.3-korg