Skip to content
This repository has been archived by the owner on Aug 4, 2024. It is now read-only.

Commit

Permalink
patches-contrib: Magisk: add another patch for building with old Clang
Browse files Browse the repository at this point in the history
Signed-off-by: Ookiineko <[email protected]>
  • Loading branch information
Ookiineko committed Dec 13, 2023
1 parent 18307ab commit 8ebd250
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions patches-contrib/Magisk/0030-base-disable-parse_mount_info.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From c483863600425111728c4df8db417a43f28be167 Mon Sep 17 00:00:00 2001
From: Ookiineko <[email protected]>
Date: Wed, 13 Dec 2023 13:17:00 +0800
Subject: [PATCH] base: disable parse_mount_info

* this function is unused by magiskboot, and it uses some new compiler feature,
unfriendly to old distros

Signed-off-by: Ookiineko <[email protected]>
---
native/src/base/files.cpp | 2 ++
1 file changed, 2 insertions(+)

diff --git a/native/src/base/files.cpp b/native/src/base/files.cpp
index 050bda6..3d7477e 100644
--- a/native/src/base/files.cpp
+++ b/native/src/base/files.cpp
@@ -127,6 +127,7 @@ void parse_prop_file(const char *file, const function<bool(string_view, string_v
parse_prop_file(fp.get(), fn);
}

+#if 0
std::vector<mount_info> parse_mount_info(const char *pid) {
char buf[PATH_MAX] = {};
ssprintf(buf, sizeof(buf), "/proc/%s/mountinfo", pid);
@@ -206,6 +207,7 @@ std::vector<mount_info> parse_mount_info(const char *pid) {
});
return result;
}
+#endif

sDIR make_dir(DIR *dp) {
return sDIR(dp, [](DIR *dp){ return dp ? closedir(dp) : 1; });
--
2.42.0

0 comments on commit 8ebd250

Please sign in to comment.