From 2b0cbf7f6b6c34c748585d255ee7756ff592a502 Mon Sep 17 00:00:00 2001
From: Mike Lothian <mike@fireburn.co.uk>
Date: Wed, 18 Dec 2024 21:15:42 +0000
Subject: [PATCH] Fix building against Boost 1.87.0 (#1455)

---
 src/input/api/DSU/DSUControllerProvider.cpp | 4 +---
 src/input/api/DSU/DSUControllerProvider.h   | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/input/api/DSU/DSUControllerProvider.cpp b/src/input/api/DSU/DSUControllerProvider.cpp
index 37f92774..fa00277c 100644
--- a/src/input/api/DSU/DSUControllerProvider.cpp
+++ b/src/input/api/DSU/DSUControllerProvider.cpp
@@ -78,9 +78,7 @@ bool DSUControllerProvider::connect()
 		using namespace boost::asio;
 
 		ip::udp::resolver resolver(m_io_service);
-		const ip::udp::resolver::query query(ip::udp::v4(), get_settings().ip, fmt::format("{}", get_settings().port),
-		                                     ip::udp::resolver::query::canonical_name);
-		m_receiver_endpoint = *resolver.resolve(query);
+		m_receiver_endpoint = *resolver.resolve(get_settings().ip, fmt::format("{}", get_settings().port)).cbegin();
 
 		if (m_socket.is_open())
 			m_socket.close();
diff --git a/src/input/api/DSU/DSUControllerProvider.h b/src/input/api/DSU/DSUControllerProvider.h
index dfa4d7b8..692da619 100644
--- a/src/input/api/DSU/DSUControllerProvider.h
+++ b/src/input/api/DSU/DSUControllerProvider.h
@@ -102,7 +102,7 @@ private:
 	std::condition_variable m_writer_cond;
 
 	uint32 m_uid;
-	boost::asio::io_service m_io_service;
+	boost::asio::io_context m_io_service;
 	boost::asio::ip::udp::endpoint m_receiver_endpoint;
 	boost::asio::ip::udp::socket m_socket;