From 4400a3b902f2f34cc3fdd5830e8cde77ff6a4824 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 20 Oct 2024 23:36:01 +0300 Subject: [PATCH] ananicy-cpp: add patch to fix detect cgroups --- pkgs/by-name/an/ananicy-cpp/package.nix | 2 ++ .../an/ananicy-cpp/reliable-mounts-file.patch | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/by-name/an/ananicy-cpp/reliable-mounts-file.patch diff --git a/pkgs/by-name/an/ananicy-cpp/package.nix b/pkgs/by-name/an/ananicy-cpp/package.nix index e34bebff8f262..424df2427495d 100644 --- a/pkgs/by-name/an/ananicy-cpp/package.nix +++ b/pkgs/by-name/an/ananicy-cpp/package.nix @@ -36,6 +36,8 @@ clangStdenv.mkDerivation (finalAttrs: { hash = "sha256-C+7x/VpVwewXEPwibi7GxGfjuhDkhcjTyGbZHlYL2Bs="; }) ./match-wrappers.patch + # https://gitlab.com/ananicy-cpp/ananicy-cpp/-/merge_requests/27 + ./reliable-mounts-file.patch ]; strictDeps = true; diff --git a/pkgs/by-name/an/ananicy-cpp/reliable-mounts-file.patch b/pkgs/by-name/an/ananicy-cpp/reliable-mounts-file.patch new file mode 100644 index 0000000000000..9daccc3d94e20 --- /dev/null +++ b/pkgs/by-name/an/ananicy-cpp/reliable-mounts-file.patch @@ -0,0 +1,13 @@ +diff --git a/src/platform/linux/cgroups.cpp b/src/platform/linux/cgroups.cpp +index 766fd2f5247ce64eb7dfd45e5551f41773eaa18b..d27dbf724bdf5097dfda0c8d4eaaadb3e81f70b3 100644 +--- a/src/platform/linux/cgroups.cpp ++++ b/src/platform/linux/cgroups.cpp +@@ -223,7 +223,7 @@ control_groups::cgroup_info control_groups::get_cgroup_version(bool reset) { + } + + if (!info.has_value()) { +- std::ifstream mtab("/etc/mtab"); ++ std::ifstream mtab("/proc/self/mounts"); + while (mtab) { + std::string word, line; + fs::path cgroup_path;