diff options
Diffstat (limited to 'meta/recipes-connectivity/kea/files/0001-Update-asiolink-for-boost-1.87.patch')
| -rw-r--r-- | meta/recipes-connectivity/kea/files/0001-Update-asiolink-for-boost-1.87.patch | 190 |
1 files changed, 0 insertions, 190 deletions
diff --git a/meta/recipes-connectivity/kea/files/0001-Update-asiolink-for-boost-1.87.patch b/meta/recipes-connectivity/kea/files/0001-Update-asiolink-for-boost-1.87.patch deleted file mode 100644 index 794726f1f1..0000000000 --- a/meta/recipes-connectivity/kea/files/0001-Update-asiolink-for-boost-1.87.patch +++ /dev/null | |||
| @@ -1,190 +0,0 @@ | |||
| 1 | From dab0f3daafb760ace0d4091f74ff90edb225ca02 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: q66 <q66@chimera-linux.org> | ||
| 3 | Date: Sun, 15 Dec 2024 03:04:53 +0100 | ||
| 4 | Subject: [PATCH] Update asiolink for boost 1.87 | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2523] | ||
| 7 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 8 | --- | ||
| 9 | src/lib/asiolink/io_address.cc | 4 ++-- | ||
| 10 | src/lib/asiolink/io_service.cc | 8 ++++---- | ||
| 11 | src/lib/asiolink/tcp_endpoint.h | 2 +- | ||
| 12 | src/lib/asiolink/udp_endpoint.h | 2 +- | ||
| 13 | src/lib/asiolink/unix_domain_socket.cc | 16 ++++++++-------- | ||
| 14 | src/lib/dhcp/iface_mgr.cc | 2 +- | ||
| 15 | 6 files changed, 17 insertions(+), 17 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/src/lib/asiolink/io_address.cc b/src/lib/asiolink/io_address.cc | ||
| 18 | index 43459bf..06b7d3d 100644 | ||
| 19 | --- a/src/lib/asiolink/io_address.cc | ||
| 20 | +++ b/src/lib/asiolink/io_address.cc | ||
| 21 | @@ -37,7 +37,7 @@ IOAddress::Hash::operator()(const IOAddress &io_address) const { | ||
| 22 | // because we'd like to throw our own exception on failure. | ||
| 23 | IOAddress::IOAddress(const std::string& address_str) { | ||
| 24 | boost::system::error_code err; | ||
| 25 | - asio_address_ = ip::address::from_string(address_str, err); | ||
| 26 | + asio_address_ = ip::make_address(address_str, err); | ||
| 27 | if (err) { | ||
| 28 | isc_throw(IOError, "Failed to convert string to address '" | ||
| 29 | << address_str << "': " << err.message()); | ||
| 30 | @@ -116,7 +116,7 @@ IOAddress::isV6Multicast() const { | ||
| 31 | uint32_t | ||
| 32 | IOAddress::toUint32() const { | ||
| 33 | if (asio_address_.is_v4()) { | ||
| 34 | - return (asio_address_.to_v4().to_ulong()); | ||
| 35 | + return (asio_address_.to_v4().to_uint()); | ||
| 36 | } else { | ||
| 37 | isc_throw(BadValue, "Can't convert " << toText() | ||
| 38 | << " address to IPv4."); | ||
| 39 | diff --git a/src/lib/asiolink/io_service.cc b/src/lib/asiolink/io_service.cc | ||
| 40 | index 411de64..cc28d24 100644 | ||
| 41 | --- a/src/lib/asiolink/io_service.cc | ||
| 42 | +++ b/src/lib/asiolink/io_service.cc | ||
| 43 | @@ -30,7 +30,7 @@ public: | ||
| 44 | /// @brief The constructor. | ||
| 45 | IOServiceImpl() : | ||
| 46 | io_service_(), | ||
| 47 | - work_(new boost::asio::io_service::work(io_service_)) { | ||
| 48 | + work_(boost::asio::make_work_guard(io_service_)) { | ||
| 49 | }; | ||
| 50 | |||
| 51 | /// @brief The destructor. | ||
| 52 | @@ -92,7 +92,7 @@ public: | ||
| 53 | |||
| 54 | /// @brief Restarts the IOService in preparation for a subsequent @ref run() invocation. | ||
| 55 | void restart() { | ||
| 56 | - io_service_.reset(); | ||
| 57 | + io_service_.restart(); | ||
| 58 | } | ||
| 59 | |||
| 60 | /// @brief Removes IO service work object to let it finish running | ||
| 61 | @@ -115,12 +115,12 @@ public: | ||
| 62 | /// | ||
| 63 | /// @param callback The callback to be run on the IO service. | ||
| 64 | void post(const std::function<void ()>& callback) { | ||
| 65 | - io_service_.post(callback); | ||
| 66 | + boost::asio::post(io_service_, callback); | ||
| 67 | } | ||
| 68 | |||
| 69 | private: | ||
| 70 | boost::asio::io_service io_service_; | ||
| 71 | - boost::shared_ptr<boost::asio::io_service::work> work_; | ||
| 72 | + boost::asio::executor_work_guard<boost::asio::io_service::executor_type> work_; | ||
| 73 | }; | ||
| 74 | |||
| 75 | IOService::IOService() : io_impl_(new IOServiceImpl()) { | ||
| 76 | diff --git a/src/lib/asiolink/tcp_endpoint.h b/src/lib/asiolink/tcp_endpoint.h | ||
| 77 | index 8ebd575..7c8cb35 100644 | ||
| 78 | --- a/src/lib/asiolink/tcp_endpoint.h | ||
| 79 | +++ b/src/lib/asiolink/tcp_endpoint.h | ||
| 80 | @@ -42,7 +42,7 @@ public: | ||
| 81 | /// \param port The TCP port number of the endpoint. | ||
| 82 | TCPEndpoint(const IOAddress& address, const unsigned short port) : | ||
| 83 | asio_endpoint_placeholder_( | ||
| 84 | - new boost::asio::ip::tcp::endpoint(boost::asio::ip::address::from_string(address.toText()), | ||
| 85 | + new boost::asio::ip::tcp::endpoint(boost::asio::ip::make_address(address.toText()), | ||
| 86 | port)), | ||
| 87 | asio_endpoint_(*asio_endpoint_placeholder_) | ||
| 88 | {} | ||
| 89 | diff --git a/src/lib/asiolink/udp_endpoint.h b/src/lib/asiolink/udp_endpoint.h | ||
| 90 | index f960bf3..2a3da9f 100644 | ||
| 91 | --- a/src/lib/asiolink/udp_endpoint.h | ||
| 92 | +++ b/src/lib/asiolink/udp_endpoint.h | ||
| 93 | @@ -42,7 +42,7 @@ public: | ||
| 94 | /// \param port The UDP port number of the endpoint. | ||
| 95 | UDPEndpoint(const IOAddress& address, const unsigned short port) : | ||
| 96 | asio_endpoint_placeholder_( | ||
| 97 | - new boost::asio::ip::udp::endpoint(boost::asio::ip::address::from_string(address.toText()), | ||
| 98 | + new boost::asio::ip::udp::endpoint(boost::asio::ip::make_address(address.toText()), | ||
| 99 | port)), | ||
| 100 | asio_endpoint_(*asio_endpoint_placeholder_) | ||
| 101 | {} | ||
| 102 | diff --git a/src/lib/asiolink/unix_domain_socket.cc b/src/lib/asiolink/unix_domain_socket.cc | ||
| 103 | index f43e1c9..43ff3c8 100644 | ||
| 104 | --- a/src/lib/asiolink/unix_domain_socket.cc | ||
| 105 | +++ b/src/lib/asiolink/unix_domain_socket.cc | ||
| 106 | @@ -83,7 +83,7 @@ public: | ||
| 107 | /// @param buffer Buffers holding the data to be sent. | ||
| 108 | /// @param handler User supplied callback to be invoked when data have | ||
| 109 | /// been sent or sending error is signalled. | ||
| 110 | - void doSend(const boost::asio::const_buffers_1& buffer, | ||
| 111 | + void doSend(const boost::asio::const_buffer& buffer, | ||
| 112 | const UnixDomainSocket::Handler& handler); | ||
| 113 | |||
| 114 | |||
| 115 | @@ -103,7 +103,7 @@ public: | ||
| 116 | /// @param ec Error code returned as a result of sending the data. | ||
| 117 | /// @param length Length of the data sent. | ||
| 118 | void sendHandler(const UnixDomainSocket::Handler& remote_handler, | ||
| 119 | - const boost::asio::const_buffers_1& buffer, | ||
| 120 | + const boost::asio::const_buffer& buffer, | ||
| 121 | const boost::system::error_code& ec, | ||
| 122 | size_t length); | ||
| 123 | |||
| 124 | @@ -127,7 +127,7 @@ public: | ||
| 125 | /// @param buffer A buffer into which the data should be received. | ||
| 126 | /// @param handler User supplied callback invoked when data have been | ||
| 127 | /// received on an error is signalled. | ||
| 128 | - void doReceive(const boost::asio::mutable_buffers_1& buffer, | ||
| 129 | + void doReceive(const boost::asio::mutable_buffer& buffer, | ||
| 130 | const UnixDomainSocket::Handler& handler); | ||
| 131 | |||
| 132 | /// @brief Local handler invoked as a result of asynchronous receive. | ||
| 133 | @@ -146,7 +146,7 @@ public: | ||
| 134 | /// @param ec Error code returned as a result of asynchronous receive. | ||
| 135 | /// @param length Size of the received data. | ||
| 136 | void receiveHandler(const UnixDomainSocket::Handler& remote_handler, | ||
| 137 | - const boost::asio::mutable_buffers_1& buffer, | ||
| 138 | + const boost::asio::mutable_buffer& buffer, | ||
| 139 | const boost::system::error_code& ec, | ||
| 140 | size_t length); | ||
| 141 | |||
| 142 | @@ -197,7 +197,7 @@ UnixDomainSocketImpl::asyncSend(const void* data, const size_t length, | ||
| 143 | } | ||
| 144 | |||
| 145 | void | ||
| 146 | -UnixDomainSocketImpl::doSend(const boost::asio::const_buffers_1& buffer, | ||
| 147 | +UnixDomainSocketImpl::doSend(const boost::asio::const_buffer& buffer, | ||
| 148 | const UnixDomainSocket::Handler& handler) { | ||
| 149 | auto local_handler = std::bind(&UnixDomainSocketImpl::sendHandler, | ||
| 150 | shared_from_this(), | ||
| 151 | @@ -207,7 +207,7 @@ UnixDomainSocketImpl::doSend(const boost::asio::const_buffers_1& buffer, | ||
| 152 | |||
| 153 | void | ||
| 154 | UnixDomainSocketImpl::sendHandler(const UnixDomainSocket::Handler& remote_handler, | ||
| 155 | - const boost::asio::const_buffers_1& buffer, | ||
| 156 | + const boost::asio::const_buffer& buffer, | ||
| 157 | const boost::system::error_code& ec, | ||
| 158 | size_t length) { | ||
| 159 | // The asynchronous send may return EWOULDBLOCK or EAGAIN on some | ||
| 160 | @@ -230,7 +230,7 @@ UnixDomainSocketImpl::asyncReceive(void* data, const size_t length, | ||
| 161 | } | ||
| 162 | |||
| 163 | void | ||
| 164 | -UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffers_1& buffer, | ||
| 165 | +UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffer& buffer, | ||
| 166 | const UnixDomainSocket::Handler& handler) { | ||
| 167 | auto local_handler = std::bind(&UnixDomainSocketImpl::receiveHandler, | ||
| 168 | shared_from_this(), | ||
| 169 | @@ -240,7 +240,7 @@ UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffers_1& buffer, | ||
| 170 | |||
| 171 | void | ||
| 172 | UnixDomainSocketImpl::receiveHandler(const UnixDomainSocket::Handler& remote_handler, | ||
| 173 | - const boost::asio::mutable_buffers_1& buffer, | ||
| 174 | + const boost::asio::mutable_buffer& buffer, | ||
| 175 | const boost::system::error_code& ec, | ||
| 176 | size_t length) { | ||
| 177 | // The asynchronous receive may return EWOULDBLOCK or EAGAIN on some | ||
| 178 | diff --git a/src/lib/dhcp/iface_mgr.cc b/src/lib/dhcp/iface_mgr.cc | ||
| 179 | index 01a1d63..419268b 100644 | ||
| 180 | --- a/src/lib/dhcp/iface_mgr.cc | ||
| 181 | +++ b/src/lib/dhcp/iface_mgr.cc | ||
| 182 | @@ -1034,7 +1034,7 @@ IfaceMgr::getLocalAddress(const IOAddress& remote_addr, const uint16_t port) { | ||
| 183 | } | ||
| 184 | |||
| 185 | // Create socket that will be used to connect to remote endpoint. | ||
| 186 | - boost::asio::io_service io_service; | ||
| 187 | + boost::asio::io_context io_service; | ||
| 188 | boost::asio::ip::udp::socket sock(io_service); | ||
| 189 | |||
| 190 | boost::system::error_code err_code; | ||
