[PATCH] m68k: fix getrandom() use with uclibc

Simon Horman horms at kernel.org
Mon Nov 27 05:46:30 PST 2023


On Sat, Apr 22, 2023 at 11:59:04AM +0200, Laurent Vivier wrote:
> With uclibc, getrandom() is only defined with _GNU_SOURCE, fix that:
> 
> kexec/arch/m68k/bootinfo.c: In function 'bootinfo_add_rng_seed':
> kexec/arch/m68k/bootinfo.c:231:13: warning: implicit declaration of function 'getrandom'; did you mean 'srandom'? [-Wimplicit-function-declaration]
>   231 |         if (getrandom(bi->rng_seed.data, RNG_SEED_LEN, GRND_NONBLOCK) != RNG_SEED_LEN) {
>       |             ^~~~~~~~~
>       |             srandom
> kexec/arch/m68k/bootinfo.c:231:56: error: 'GRND_NONBLOCK' undeclared (first use in this function)
>   231 |         if (getrandom(bi->rng_seed.data, RNG_SEED_LEN, GRND_NONBLOCK) != RNG_SEED_LEN) {
>       |                                                        ^~~~~~~~~~~~~
> 
> Fixes:  b9de05184816 ("m68k: pass rng seed via BI_RNG_SEED")
> Cc: Jason at zx2c4.com
> Signed-off-by: Laurent Vivier <laurent at vivier.eu>

Thanks, applied.



More information about the kexec mailing list