summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kexec/kexec-tools/0001-ppc-fs2dt-Match-function-signatures.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/kexec/kexec-tools/0001-ppc-fs2dt-Match-function-signatures.patch')
-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;