* [PATCH] m68k: fix getrandom() use with uclibc
@ 2023-04-22 9:59 Laurent Vivier
2023-11-27 13:46 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Vivier @ 2023-04-22 9:59 UTC (permalink / raw)
To: kexec; +Cc: Simon Horman, Laurent Vivier, Jason
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@zx2c4.com
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
kexec/arch/m68k/bootinfo.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kexec/arch/m68k/bootinfo.c b/kexec/arch/m68k/bootinfo.c
index 086a34bdfdeb..5afd212d9d34 100644
--- a/kexec/arch/m68k/bootinfo.c
+++ b/kexec/arch/m68k/bootinfo.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
--
2.40.0
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] m68k: fix getrandom() use with uclibc
2023-04-22 9:59 [PATCH] m68k: fix getrandom() use with uclibc Laurent Vivier
@ 2023-11-27 13:46 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2023-11-27 13:46 UTC (permalink / raw)
To: Laurent Vivier; +Cc: kexec, Jason
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@zx2c4.com
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Thanks, applied.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-27 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-22 9:59 [PATCH] m68k: fix getrandom() use with uclibc Laurent Vivier
2023-11-27 13:46 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox