[PATCH 1/2] kexec-tools: powerpc: Fix function signature of comparefunc()
Simon Horman
horms at kernel.org
Tue Nov 11 05:31:28 PST 2025
On Wed, Oct 22, 2025 at 01:44:12PM +0200, John Paul Adrian Glaubitz wrote:
> 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 at physik.fu-berlin.de>
Thanks,
I was able to reproduce this using gcc-powerpc-linux-gnu 4:14.2.0-1
on Debian Trixie. Likewise for patch 2/2.
There is a CI workflow that exercises 32-bit PowerPC builds [1].
However, it does not exhibit the problems reported.
I guess that is because it is using an older GCC,
gcc-powerpc-linux-gnu 4:13.2.0-7ubuntu1 on Ubuntu 24.04.
[1] https://github.com/horms/kexec-tools/actions/runs/18554906205/job/52889935741
It would be nice to update the job,
but perhaps that is something that comes with Ubuntu 26.04.
In any case I have applied this series:
- kexec-tools: powerpc: Fix pointer declarations in read_memory_region_limits()
https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=6c878e9b8a50
- kexec-tools: powerpc: Fix function signature of comparefunc()
https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=2786f8eb3e5e
More information about the kexec
mailing list