Files
rpi-buildroot/package/android-tools/0013-extras-ext4_utils-make_ext4fs_main.c-disable-Android.patch
Thomas Petazzoni 3ee745782a package/android-tools: convert all patches to Git-formatted patches
This will make it easier to modify the patch series moving forward. No
functional changes.

On one patch, we added the SoB from Giulio, which was missing. Giulio
was the original contributor of the patch, and nobody touched it since
it was introduced.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-12-04 22:40:19 +01:00

55 lines
1.7 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 01e86db8460d873aec15d658bfc717b026c0545f Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Sun, 14 Jul 2024 11:46:51 +0200
Subject: [PATCH] extras/ext4_utils/make_ext4fs_main.c: disable
Android-specific code
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since we are not building with the Android code, we do not have the
implementation of the selinux_android_file_context_handle(). However,
its only call site is when 'mountpoint' is set, and 'mountpoint'
cannot be non-NULL in non-Android cases due to how the -a option is
parsed:
case 'a':
#ifdef ANDROID
fs_config_func = fs_config;
mountpoint = optarg;
#else
fprintf(stderr, "can't set android permissions - built without android support\n");
usage(argv[0]);
exit(EXIT_FAILURE);
#endif
So also compile out the code calling
selinux_android_file_context_handle() when ANDROID is not set.
Fixes:
make_ext4fs_main.c:155:25: error: implicit declaration of function selinux_android_file_context_handle [-Wimplicit-function-declaration]
Upstream: N/A, we're too far from upstream
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
extras/ext4_utils/make_ext4fs_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extras/ext4_utils/make_ext4fs_main.c b/extras/ext4_utils/make_ext4fs_main.c
index 17d3735..cb58011 100644
--- a/extras/ext4_utils/make_ext4fs_main.c
+++ b/extras/ext4_utils/make_ext4fs_main.c
@@ -149,7 +149,7 @@ int main(int argc, char **argv)
}
}
-#if !defined(HOST)
+#if !defined(HOST) && defined(ANDROID)
// Use only if -S option not requested
if (!sehnd && mountpoint) {
sehnd = selinux_android_file_context_handle();
--
2.47.0