Build fix: support boost 1.87+
The cray simulator would not start after a system wide boost update. Re-building also failed as the code relied on stuff that has been depreciated in boost 1.87. This commit provides a fix.
This commit is contained in:
@@ -42,7 +42,7 @@ void server::setup(const std::string& address, const std::string& port)
|
||||
boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), boost::lexical_cast<short>(port));
|
||||
if (address != "*") {
|
||||
boost::asio::ip::tcp::resolver resolver(io_service_);
|
||||
endpoint = *resolver.resolve({ address, port });
|
||||
endpoint = *resolver.resolve(address, port).begin();
|
||||
}
|
||||
acceptor_.open(endpoint.protocol());
|
||||
acceptor_.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
|
||||
|
||||
@@ -45,7 +45,7 @@ private:
|
||||
void do_await_stop();
|
||||
|
||||
/// The io_service used to perform asynchronous operations.
|
||||
boost::asio::io_service io_service_;
|
||||
boost::asio::io_context io_service_;
|
||||
|
||||
/// The signal_set is used to register for process termination notifications.
|
||||
boost::asio::signal_set signals_;
|
||||
|
||||
@@ -203,7 +203,7 @@ void Console_c::Tick() {
|
||||
}
|
||||
|
||||
void Console_c::Poll() {
|
||||
mIoService.reset();
|
||||
mIoService.restart();
|
||||
mIoService.poll();
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ void Console_c::AcceptIfNeeded(bool aSilent) {
|
||||
}
|
||||
}
|
||||
|
||||
boost::asio::io_service Console_c::mIoService;
|
||||
boost::asio::io_context Console_c::mIoService;
|
||||
|
||||
#if defined(PARTIAL_DEBUG) && defined(_MSC_VER)
|
||||
#pragma optimize ("", on)
|
||||
|
||||
@@ -101,7 +101,7 @@ protected:
|
||||
boost::optional<std::string> mConsoleCommand;
|
||||
boost::optional<std::string> mNewTerminalCommand;
|
||||
|
||||
static boost::asio::io_service mIoService;
|
||||
static boost::asio::io_context mIoService;
|
||||
std::shared_ptr<boost::asio::ip::tcp::acceptor> mServerSocket;
|
||||
std::shared_ptr<boost::asio::ip::tcp::socket> mConnectionSocket;
|
||||
boost::array<char, 1> mReceiveBuf;
|
||||
|
||||
@@ -78,7 +78,7 @@ void IopConcentrator_c::ProcessReceivedBytes() {
|
||||
size_t i;
|
||||
size_t size = mReceiveBuf.size();
|
||||
while (size > 0) {
|
||||
const uint8_t *data = boost::asio::buffer_cast<const uint8_t *>(mReceiveBuf.data());
|
||||
const uint8_t *data = static_cast<const uint8_t *>(mReceiveBuf.data().data());
|
||||
switch (mRcvState) {
|
||||
case State_RcvLcpPduLength: // process 4-byte PDU length value
|
||||
if (size < 4) return;
|
||||
@@ -325,7 +325,7 @@ void IopConcentrator_c::Tick() {
|
||||
}
|
||||
}
|
||||
|
||||
boost::asio::io_service IopConcentrator_c::mIoService;
|
||||
boost::asio::io_context IopConcentrator_c::mIoService;
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
// IopConcentratorChannel_c
|
||||
|
||||
@@ -147,7 +147,7 @@ protected:
|
||||
std::shared_ptr<boost::asio::ip::tcp::socket> mConnectionSocket;
|
||||
std::vector<CInt_t> mFromCrayData;
|
||||
IopConcentratorChannel_c mInputChannel;
|
||||
static boost::asio::io_service mIoService;
|
||||
static boost::asio::io_context mIoService;
|
||||
uint8_t mLastRcvdMessageCode;
|
||||
uint8_t mLastXmitMessageCode;
|
||||
std::shared_ptr<boost::asio::ip::tcp::acceptor> mListenSocket;
|
||||
|
||||
Reference in New Issue
Block a user