Files
winf-photobooth/package/kexec/0001-kexec-tools-powerpc-Fix-function-signature-of-comparefunc.patch
Michael b8783708ae Initial Commit
- initial default booting image
2026-11-06 20:45:42 +01:00

43 lines
1.8 KiB
Diff

From b89799f7f20d4b2476e99e95e6795450f2f1c111 Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Wed, 22 Oct 2025 13:44:12 +0200
Subject: kexec-tools: powerpc: Fix function signature of comparefunc()
Fixes the following build error on 32-bit PowerPC:
kexec/arch/ppc/fs2dt.c: In function 'putnode':
kexec/arch/ppc/fs2dt.c:338:51: error: passing argument 4 of 'scandir' from incompatible pointer type [-Wincompatible-pointer-types]
338 | numlist = scandir(pathname, &namelist, 0, comparefunc);
| ^~~~~~~~~~~
| |
| int (*)(const void *, const void *)
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Khalid Aziz <khalid@gonehiking.org>
Signed-off-by: Simon Horman <horms@kernel.org>
Upstream: https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=b89799f7f20d4b2476e99e95e6795450f2f1c111
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
kexec/arch/ppc/fs2dt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kexec/arch/ppc/fs2dt.c b/kexec/arch/ppc/fs2dt.c
index fed499b..d03b995 100644
--- a/kexec/arch/ppc/fs2dt.c
+++ b/kexec/arch/ppc/fs2dt.c
@@ -292,7 +292,8 @@ static void putprops(char *fn, struct dirent **nlist, int numlist)
* Compare function used to sort the device-tree directories
* This function will be passed to scandir.
*/
-static int comparefunc(const void *dentry1, const void *dentry2)
+static int comparefunc(const struct dirent **dentry1,
+ const struct dirent **dentry2)
{
char *str1 = (*(struct dirent **)dentry1)->d_name;
char *str2 = (*(struct dirent **)dentry2)->d_name;
--
cgit 1.3-korg