mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-08 11:13:03 +00:00
Fix building for Boost < 1.66
This commit is contained in:
@@ -85,6 +85,13 @@ if(OS_IS_MACOSX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(Boost_VERSION VERSION_GREATER "1.65")
|
||||
target_compile_definitions(signal_source_gr_blocks
|
||||
PUBLIC
|
||||
-DBOOST_GREATER_1_65
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(signal_source_gr_blocks
|
||||
|
||||
@@ -147,7 +147,7 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address,
|
||||
boost::asio::async_read(socket_, boost::asio::buffer(data_),
|
||||
boost::bind(&rtl_tcp_signal_source_c::handle_read,
|
||||
this, _1, _2));
|
||||
boost::thread(boost::bind(&boost::asio::io_context::run, &io_context_));
|
||||
boost::thread(boost::bind(&b_io_context::run, &io_context_));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -52,6 +52,12 @@ class rtl_tcp_signal_source_c;
|
||||
|
||||
using rtl_tcp_signal_source_c_sptr = boost::shared_ptr<rtl_tcp_signal_source_c>;
|
||||
|
||||
#if BOOST_GREATER_1_65
|
||||
using b_io_context = boost::asio::io_context;
|
||||
#else
|
||||
using b_io_context = boost::asio::io_service;
|
||||
#endif
|
||||
|
||||
rtl_tcp_signal_source_c_sptr
|
||||
rtl_tcp_make_signal_source_c(const std::string &address,
|
||||
int16_t port,
|
||||
@@ -91,7 +97,7 @@ private:
|
||||
Rtl_Tcp_Dongle_Info info_;
|
||||
|
||||
// IO members
|
||||
boost::asio::io_context io_context_;
|
||||
b_io_context io_context_;
|
||||
boost::asio::ip::tcp::socket socket_;
|
||||
std::vector<unsigned char> data_;
|
||||
bool flip_iq_;
|
||||
|
||||
Reference in New Issue
Block a user