Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ananicy-cpp: add patch to fix detect cgroups #350109

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;