forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-ros/rosserial_server: fix build with boost 1.70.
Closes: https://bugs.gentoo.org/690706 Package-Manager: Portage-2.3.75, Repoman-2.3.17 Signed-off-by: Alexis Ballier <[email protected]>
- Loading branch information
Showing
2 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
Index: rosserial_server/include/rosserial_server/async_read_buffer.h | ||
=================================================================== | ||
--- rosserial_server.orig/include/rosserial_server/async_read_buffer.h | ||
+++ rosserial_server/include/rosserial_server/async_read_buffer.h | ||
@@ -166,7 +166,7 @@ private: | ||
|
||
// Post the callback rather than executing it here so, so that we have a chance to do the cleanup | ||
// below prior to it actually getting run, in the event that the callback queues up another read. | ||
- stream_.get_io_service().post(boost::bind(read_success_callback_, stream)); | ||
+ static_cast<boost::asio::io_service&>(stream_.get_executor().context()).post(boost::bind(read_success_callback_, stream)); | ||
|
||
// Resetting these values clears our state so that we know there isn't a callback pending. | ||
read_requested_bytes_ = 0; | ||
Index: rosserial_server/include/rosserial_server/udp_stream.h | ||
=================================================================== | ||
--- rosserial_server.orig/include/rosserial_server/udp_stream.h | ||
+++ rosserial_server/include/rosserial_server/udp_stream.h | ||
@@ -48,7 +48,6 @@ namespace rosserial_server | ||
{ | ||
|
||
using boost::asio::ip::udp; | ||
-using boost::asio::handler_type; | ||
|
||
|
||
class UdpStream : public udp::socket | ||
@@ -62,9 +61,9 @@ public: | ||
{ | ||
boost::system::error_code ec; | ||
const protocol_type protocol = server_endpoint.protocol(); | ||
- this->get_service().open(this->get_implementation(), protocol, ec); | ||
+ udp::socket::open(protocol, ec); | ||
boost::asio::detail::throw_error(ec, "open"); | ||
- this->get_service().bind(this->get_implementation(), server_endpoint, ec); | ||
+ bind(server_endpoint, ec); | ||
boost::asio::detail::throw_error(ec, "bind"); | ||
|
||
client_endpoint_ = client_endpoint; | ||
@@ -76,6 +75,8 @@ public: | ||
async_write_some(const ConstBufferSequence& buffers, | ||
BOOST_ASIO_MOVE_ARG(WriteHandler) handler) | ||
{ | ||
+ return async_send(buffers, handler); | ||
+#if 0 | ||
// If you get an error on the following line it means that your handler does | ||
// not meet the documented type requirements for a WriteHandler. | ||
BOOST_ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check; | ||
@@ -94,6 +95,7 @@ public: | ||
this->get_implementation(), buffers, client_endpoint_, 0, | ||
BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)); | ||
#endif | ||
+#endif | ||
} | ||
|
||
template <typename MutableBufferSequence, typename ReadHandler> | ||
@@ -102,6 +104,8 @@ public: | ||
async_read_some(const MutableBufferSequence& buffers, | ||
BOOST_ASIO_MOVE_ARG(ReadHandler) handler) | ||
{ | ||
+ return async_receive(buffers, handler); | ||
+#if 0 | ||
// If you get an error on the following line it means that your handler does | ||
// not meet the documented type requirements for a ReadHandler. | ||
BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check; | ||
@@ -119,6 +123,7 @@ public: | ||
this->get_implementation(), buffers, client_endpoint_, 0, | ||
BOOST_ASIO_MOVE_CAST(ReadHandler)(handler)); | ||
#endif | ||
+#endif | ||
} | ||
|
||
private: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters