Fix for Boost 1.73

This commit is contained in:
Carles Fernandez 2020-06-06 14:11:19 +02:00
parent 8c965bb4f3
commit cd2dfe0bc2
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 13 additions and 1 deletions

View File

@ -103,6 +103,13 @@ if(Boost_VERSION_STRING VERSION_GREATER 1.65.99)
)
endif()
if(Boost_VERSION_STRING VERSION_GREATER 1.72.99)
target_compile_definitions(signal_source_gr_blocks
PRIVATE
-DBOOST_173_OR_GREATER=1
)
endif()
if(CMAKE_VERSION VERSION_GREATER 3.1)
set(has_generic_lambdas HAS_GENERIC_LAMBDA=1)
set(no_has_generic_lambdas HAS_GENERIC_LAMBDA=0)

View File

@ -133,9 +133,14 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address,
LOG(INFO) << "Found " << info_.get_type_name() << " tuner.";
}
// 6. Start reading
// 6. Start reading
#if BOOST_173_OR_GREATER
boost::bind(&rtl_tcp_signal_source_c::handle_read, this, boost::placeholders::_1, boost::placeholders::_2));
#else
boost::asio::async_read(socket_, boost::asio::buffer(data_),
boost::bind(&rtl_tcp_signal_source_c::handle_read, this, _1, _2)); // NOLINT(modernize-avoid-bind)
#endif
boost::thread(
#if HAS_GENERIC_LAMBDA