sci-ml/pytorch: should fix build with newer cpp-httplib

Closes: https://bugs.gentoo.org/982667
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
Alfredo Tupone
2026-09-18 13:28:28 +02:00
parent bd9f770fae
commit 8704bb9792
2 changed files with 22 additions and 0 deletions
@@ -0,0 +1,21 @@
--- a/torch/csrc/distributed/c10d/control_plane/WorkerServer.cpp 2026-09-18 13:16:02.333994098 +0200
+++ b/torch/csrc/distributed/c10d/control_plane/WorkerServer.cpp 2026-09-18 13:18:25.083555926 +0200
@@ -20,12 +20,17 @@
}
const std::multimap<std::string, std::string>& params() const override {
- return req_.params;
+ cached_params_.clear();
+ for (const auto& pair : req_.params) {
+ cached_params_.insert(pair);
+ }
+ return cached_params_;
}
private:
// NOLINTNEXTLINE(cppcoreguidelines-avoid-const-or-ref-data-members)
const httplib::Request& req_;
+ mutable std::multimap<std::string, std::string> cached_params_;
};
class ResponseImpl : public Response {
+1
View File
@@ -177,6 +177,7 @@ PATCHES=(
"${FILESDIR}"/${P}-unbundle_pocketfft.patch
"${FILESDIR}"/${PN}-2.13.0-xnnpack.patch
"${FILESDIR}"/${P}-license.patch
"${FILESDIR}"/${P}-cpp-httplib.patch
)
src_prepare() {