osrm-backend: fix build with boost187
This commit is contained in:
14
pkgs/servers/osrm-backend/boost187-compat.patch
Normal file
14
pkgs/servers/osrm-backend/boost187-compat.patch
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user