supercollider: rebuilt against boost-1.72

This commit is contained in:
John 2020-01-09 22:12:30 +01:00
parent 434b737da1
commit 74cd0dfcb2
2 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,35 @@
From ee2c63c89e6e3f5a14e09a9c7edaaf6774190ce6 Mon Sep 17 00:00:00 2001
From: Brian Heim <brianlheim@gmail.com>
Date: Thu, 19 Sep 2019 20:54:52 -0500
Subject: [PATCH] Update for boost 1.70
---
server/supernova/sc/sc_osc_handler.cpp | 2 +-
server/supernova/utilities/utils.hpp | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/supernova/sc/sc_osc_handler.cpp b/server/supernova/sc/sc_osc_handler.cpp
index 33d907a3df..bf307fc13b 100644
--- server/supernova/sc/sc_osc_handler.cpp
+++ server/supernova/sc/sc_osc_handler.cpp
@@ -734,7 +734,7 @@ void sc_osc_handler::tcp_connection::handle_message() {
void sc_osc_handler::start_tcp_accept(void) {
- tcp_connection::pointer new_connection = tcp_connection::create(tcp_acceptor_.get_io_service());
+ tcp_connection::pointer new_connection = tcp_connection::create(tcp_acceptor_.get_executor().context());
tcp_acceptor_.async_accept(
new_connection->socket(),
diff --git a/server/supernova/utilities/utils.hpp b/server/supernova/utilities/utils.hpp
index 35b8ab5ada..a7c191f2db 100644
--- server/supernova/utilities/utils.hpp
+++ server/supernova/utilities/utils.hpp
@@ -23,6 +23,7 @@
#include <type_traits>
+#include <boost/checked_delete.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/noncopyable.hpp>
#include <boost/detail/atomic_count.hpp>

View File

@ -0,0 +1,60 @@
From f4e5cc69aaa09f26f3dcd19f0e9db85b525b4b70 Mon Sep 17 00:00:00 2001
From: Brian Heim <brianlheim@gmail.com>
Date: Sun, 6 Oct 2019 18:39:38 -0500
Subject: [PATCH] supernova: fix compile errors with boost 1.71
class hierarchy changed. this change is at least backward compatible with 1.70
tested with boost 1.66, 1.71
---
server/supernova/sc/sc_osc_handler.cpp | 2 +-
server/supernova/sc/sc_osc_handler.hpp | 15 ++++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/server/supernova/sc/sc_osc_handler.cpp b/server/supernova/sc/sc_osc_handler.cpp
index bf307fc13b..f1655946c2 100644
--- server/supernova/sc/sc_osc_handler.cpp
+++ server/supernova/sc/sc_osc_handler.cpp
@@ -734,7 +734,7 @@ void sc_osc_handler::tcp_connection::handle_message() {
void sc_osc_handler::start_tcp_accept(void) {
- tcp_connection::pointer new_connection = tcp_connection::create(tcp_acceptor_.get_executor().context());
+ tcp_connection::pointer new_connection = tcp_connection::create(tcp_acceptor_.get_executor());
tcp_acceptor_.async_accept(
new_connection->socket(),
diff --git a/server/supernova/sc/sc_osc_handler.hpp b/server/supernova/sc/sc_osc_handler.hpp
index 6a97774942..3d4bc6d2ff 100644
--- server/supernova/sc/sc_osc_handler.hpp
+++ server/supernova/sc/sc_osc_handler.hpp
@@ -226,9 +226,14 @@ class sc_osc_handler : private detail::network_thread, public sc_notify_observer
public:
class tcp_connection : public nova_endpoint {
public:
- typedef std::shared_ptr<tcp_connection> pointer;
+ using pointer = std::shared_ptr<tcp_connection>;
+#if BOOST_VERSION >= 107000
+ using executor = boost::asio::executor;
+#else
+ using executor = boost::asio::io_context::executor_type;
+#endif
- static pointer create(boost::asio::io_service& io_service) { return pointer(new tcp_connection(io_service)); }
+ static pointer create(const executor& executor) { return pointer(new tcp_connection(executor)); }
tcp::socket& socket() { return socket_; }
@@ -237,7 +242,11 @@ class sc_osc_handler : private detail::network_thread, public sc_notify_observer
bool operator==(tcp_connection const& rhs) const { return &rhs == this; }
private:
- tcp_connection(boost::asio::io_service& io_service): socket_(io_service) {}
+#if BOOST_VERSION >= 107000
+ tcp_connection(const executor& executor): socket_(executor) {}
+#else
+ tcp_connection(const executor& executor): socket_(executor.context()) {}
+#endif
void send(const char* data, size_t length) override final;