osrm-backend: fix build with boost187

This commit is contained in:
Tobias Mayer
2025-02-03 07:48:54 +01:00
parent dc2bac706e
commit f010978de6
2 changed files with 20 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
diff --git a/include/server/server.hpp b/include/server/server.hpp
index 34b8982e67a..02b0dda050d 100644
--- a/include/server/server.hpp
+++ b/include/server/server.hpp
@@ -53,8 +53,7 @@ class Server
const auto port_string = std::to_string(port);
boost::asio::ip::tcp::resolver resolver(io_context);
- boost::asio::ip::tcp::resolver::query query(address, port_string);
- boost::asio::ip::tcp::endpoint endpoint = *resolver.resolve(query);
+ boost::asio::ip::tcp::endpoint endpoint = *resolver.resolve(address, port_string).begin();
acceptor.open(endpoint.protocol());
#ifdef SO_REUSEPORT

View File

@@ -2,7 +2,6 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
bzip2,
@@ -16,7 +15,7 @@
nixosTests,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "osrm-backend";
version = "5.27.1-unstable-2024-11-03";
@@ -27,6 +26,11 @@ stdenv.mkDerivation rec {
hash = "sha256-iix++G49cC13wZGZIpXu1SWGtVAcqpuX3GhsIaETzUU=";
};
patches = [
# Taken from https://github.com/Project-OSRM/osrm-backend/pull/7073.
./boost187-compat.patch
];
nativeBuildInputs = [
cmake
pkg-config