All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: buildroot@buildroot.org
Cc: "Thomas Huth" <huth@tuxfamily.org>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Romain Naour" <romain.naour@gmail.com>
Subject: [Buildroot] [PATCH v11 1/5] kexec: fix sys/random.h with uclibc
Date: Fri, 21 Apr 2023 20:49:59 +0200	[thread overview]
Message-ID: <20230421185003.1221000-2-laurent@vivier.eu> (raw)
In-Reply-To: <20230421185003.1221000-1-laurent@vivier.eu>

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 ...1-m68k-fix-getrandom-use-with-uclibc.patch | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/kexec/0001-m68k-fix-getrandom-use-with-uclibc.patch

diff --git a/package/kexec/0001-m68k-fix-getrandom-use-with-uclibc.patch b/package/kexec/0001-m68k-fix-getrandom-use-with-uclibc.patch
new file mode 100644
index 000000000000..d2fc3bc88641
--- /dev/null
+++ b/package/kexec/0001-m68k-fix-getrandom-use-with-uclibc.patch
@@ -0,0 +1,35 @@
+From 491439a5c55b18dce96b522f3a603faaf1908ede Mon Sep 17 00:00:00 2001
+From: Laurent Vivier <laurent@vivier.eu>
+Date: Fri, 21 Apr 2023 18:22:07 +0200
+Subject: [PATCH] m68k: fix getrandom() use with uclibc
+
+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
+
-- 
2.40.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-04-21 18:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21 18:49 [Buildroot] [PATCH v11 0/5] package: add petitboot to use with qemu-system-m68k Laurent Vivier
2023-04-21 18:49 ` Laurent Vivier [this message]
2023-04-23 10:29   ` [Buildroot] [PATCH v11 1/5] kexec: fix sys/random.h with uclibc Laurent Vivier
2023-06-03 20:49   ` Arnout Vandecappelle via buildroot
2023-04-21 18:50 ` [Buildroot] [PATCH v11 2/5] petitboot: add pb-discover daemon Laurent Vivier
2023-04-21 18:50 ` [Buildroot] [PATCH v11 3/5] petitboot: start petitboot on all tty Laurent Vivier
2023-04-21 18:50 ` [Buildroot] [PATCH v11 4/5] board/qemu/m68k-virt: Add virt-m68k linux config Laurent Vivier
2023-04-21 18:50 ` [Buildroot] [PATCH v11 5/5] support/scripts/boot-qemu-image.py: manage petitboot interface Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230421185003.1221000-2-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=buildroot@buildroot.org \
    --cc=clg@kaod.org \
    --cc=huth@tuxfamily.org \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.