Skip to content

Commit

Permalink
ananicy-cpp: add patch to fix detect cgroups
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin committed Oct 20, 2024
1 parent 35f9ccf commit 4400a3b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/by-name/an/ananicy-cpp/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
13 changes: 13 additions & 0 deletions pkgs/by-name/an/ananicy-cpp/reliable-mounts-file.patch
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 4400a3b

Please sign in to comment.