package/gdb: fix gdb-10.2 compile for uclibc < v1.0.35 (getrandom related)
PATCH 1/1 package/gdb: fix gdb-10.2 compile for uclibc < v1.0.35 (getrandom related)
- fix getrandom compile for uclibc < v1.0.35, add missing stddef.h include (fixed in uclibc since v1.0.35, see [1])
Fixes:
- http://autobuild.buildroot.net/results/6d4a62c703c85dd993ddb2d90ebe1f6cad24e0b0
.../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name ‘size_t’
27 | extern int getrandom(void *__buf, size_t count, unsigned int flags)
| ^~~~~~
--- ...getrandom-compile-for-uclibc-v1.0.35.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/gdb/10.2/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch
package/gdb/10.2/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch new file +39 -0
@@ -0,0 +1,39 @@ +From bb894a9cfb1c3cf0e0a174c496ad848f589ee7da Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Sat, 6 Nov 2021 10:06:25 +0100 +Subject: [PATCH] Fix getrandom compile for uclibc < v1.0.35 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- fix getrandom compile for uclibc < v1.0.35, add missing stddef.h + include (fixed in uclibc since v1.0.35, see [1]) + +Fixes: + + .../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name ‘size_t’ + 27 | extern int getrandom(void *__buf, size_t count, unsigned int flags) + | ^~~~~~ + +[1] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=00972c02c2b6e0a95d5def4a71bdfb188e091782t + +Signed-off-by: Peter Seiderer <[email protected]> +--- + gnulib/import/getrandom.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gnulib/import/getrandom.c b/gnulib/import/getrandom.c +index 030a78b..7b24350 100644 +--- a/gnulib/import/getrandom.c ++++ b/gnulib/import/getrandom.c +@@ -19,6 +19,7 @@ + + #include <config.h> + ++#include <stddef.h> + #include <sys/random.h> + + #include <errno.h> +-- +2.33.1 +
Signature · 6 lines
2.33.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni
AppliedQuoted 11 lines · On Sat, 6 Nov 2021 10:15:08 +0100 Peter Seiderer <[email protected]> wrote:
- fix getrandom compile for uclibc < v1.0.35, add missing
stddef.hinclude (fixed in uclibc since v1.0.35, see [1])Fixes:
- http://autobuild.buildroot.net/results/6d4a62c703c85dd993ddb2d90ebe1f6cad24e0b0
.../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name ‘size_t’
27 | extern intgetrandom(void *__buf, size_t count, unsigned int flags)
| ^~~~~~
Quoted 7 lines
Signed-off-by Peter Seiderer <[email protected]>--- ...getrandom-compile-for-uclibc-v1.0.35.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/gdb/10.2/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch
Applied to master, thanks. Did you verify that this was only applicable to gdb 10.x, and none of the older or newer versions ?
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Thomas,
Quoted 16 lines · Thomas Petazzoni
Quoted 13 lines · On Sat, 6 Nov 2021 10:15:08 +0100 Peter Seiderer <[email protected]> wrote:
- fix getrandom compile for uclibc < v1.0.35, add missing
stddef.hinclude (fixed in uclibc since v1.0.35, see [1])Fixes:
- http://autobuild.buildroot.net/results/6d4a62c703c85dd993ddb2d90ebe1f6cad24e0b0
.../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name ‘size_t’
27 | extern intgetrandom(void *__buf, size_t count, unsigned int flags)
| ^~~~~~
Quoted 8 lines
Quoted 5 lines
Signed-off-by Peter Seiderer <[email protected]>--- ...getrandom-compile-for-uclibc-v1.0.35.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 package/gdb/10.2/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patchApplied to master, thanks. Did you verify that this was only applicable to gdb 10.x, and none of the older or newer versions ?
Just now..., gdb-9.2 seems not affected, gdb-11.1 shows the same failure, patch follows...
Regards,
Peter
Quoted 4 lines
Thanks!
Thomas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Seiderer <[email protected]> writes:
- fix getrandom compile for uclibc < v1.0.35, add missing
stddef.hinclude (fixed in uclibc since v1.0.35, see [1])Fixes:
- http://autobuild.buildroot.net/results/6d4a62c703c85dd993ddb2d90ebe1f6cad24e0b0
Quoted 7 lines
.../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name ‘size_t’
27 | extern intgetrandom(void *__buf, size_t count, unsigned int flags)
| ^~~~~~Signed-off-by Peter Seiderer <[email protected]>
Committed to 2021.02.x and 2021.08.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot