summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kexec/kexec-tools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-05-17 08:02:13 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-05-19 17:55:18 +0100
commitd83d45adc4e00fbb0861d3966245d9531a2be986 (patch)
tree3afe44db501d5b8e53369a6d7b47a9d5bf07e25c /meta/recipes-kernel/kexec/kexec-tools
parente0d21f5c4f58f1521d86a39997c4ca62d75ad914 (diff)
downloadpoky-d83d45adc4e00fbb0861d3966245d9531a2be986.tar.gz
kexec-tools: Fix ppc build
Compiler can analyse function pointer parameters now a days and it reports the mismatches, hence fixed. (From OE-Core rev: 99c62c5d26e9a046276f4ccd9df307c7a25cd393) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/kexec/kexec-tools')
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-ppc-fs2dt-Match-function-signatures.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-ppc-fs2dt-Match-function-signatures.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-ppc-fs2dt-Match-function-signatures.patch
new file mode 100644
index 0000000000..483e5195a9
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0001-ppc-fs2dt-Match-function-signatures.patch
@@ -0,0 +1,31 @@
1From 4a07e8f22b4f224dca79767e5cb86a0de91498dc Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 17 May 2025 07:48:50 -0700
4Subject: [PATCH] ppc/fs2dt: Match function signatures
5
6The prototypes of function pointers is analysed and
7compiler finds the signature mismatches and complain about it.
8
9../kexec-tools-2.0.31/kexec/arch/ppc/fs2dt.c:338:44: error: incompatible function pointer types passing 'int (const void *, const void *)' to parameter of type 'int (*)(const struct dirent **, const struct dirent **)' [-Wincompatible-function-pointer-types]
10 338 | numlist = scandir(pathname, &namelist, 0, comparefunc);
11 | ^~~~~~~~~~~
12
13Upstream-Status: Submitted [https://lore.kernel.org/kexec/20250517145852.2488183-1-raj.khem@gmail.com/T/#u]
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 kexec/arch/ppc/fs2dt.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/kexec/arch/ppc/fs2dt.c b/kexec/arch/ppc/fs2dt.c
20index fed499b..4952bfc 100644
21--- a/kexec/arch/ppc/fs2dt.c
22+++ b/kexec/arch/ppc/fs2dt.c
23@@ -292,7 +292,7 @@ static void putprops(char *fn, struct dirent **nlist, int numlist)
24 * Compare function used to sort the device-tree directories
25 * This function will be passed to scandir.
26 */
27-static int comparefunc(const void *dentry1, const void *dentry2)
28+static int comparefunc(const struct dirent ** dentry1, const struct dirent **dentry2)
29 {
30 char *str1 = (*(struct dirent **)dentry1)->d_name;
31 char *str2 = (*(struct dirent **)dentry2)->d_name;