Unverified Commit 9a1f8947 authored by John Titor's avatar John Titor
Browse files

ananicy-cpp: unvendor mtabs upstream patch

parent 889b2906
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -29,15 +29,19 @@ clangStdenv.mkDerivation (finalAttrs: {
  };

  patches = [
    # FIXME: remove this when updating to next stable release
    ./match-wrappers.patch

    # FIXME: remove these when updating to next stable release
    (fetchpatch {
      name = "allow-regex-pattern-matching.patch";
      url = "https://gitlab.com/ananicy-cpp/ananicy-cpp/-/commit/6ea2dccceec39b6c4913f617dad81d859aa20f24.patch";
      hash = "sha256-C+7x/VpVwewXEPwibi7GxGfjuhDkhcjTyGbZHlYL2Bs=";
    })
    ./match-wrappers.patch
    # https://gitlab.com/ananicy-cpp/ananicy-cpp/-/merge_requests/27
    ./reliable-mounts-file.patch
    (fetchpatch {
      name = "use-a-reliable-path-for-mounts-file.patch";
      url = "https://gitlab.com/ananicy-cpp/ananicy-cpp/-/commit/de6f11978db98bfd13a1e87dcdab61dbe6496710.patch";
      hash = "sha256-9bJlFCClddlAEknfqp7Gcij7NX6tqohE2wqoalLoN5I=";
    })
  ];

  strictDeps = true;
+0 −13
Original line number Diff line number Diff line
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;