[Buildroot] [git commit] package/tar: fix build with uclibc-ng < 1.0.35
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: 2021-08-08 20:18:39
Subsystem:
the rest · Maintainer:
Linus Torvalds
commit: https://git.buildroot.net/buildroot/commit/?id=2e16ecfa990006308e638685fbea3800706c0f84 branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master Fix the folllowing build failure with uclibc-ng which is raised since bump to version 1.34 in commit 27fffea6db7358af20f5a3a8faa174d3b782d61f: In file included from ./sys/random.h:40, from getrandom.c:22: /tmp/instance-0/output-1/per-package/tar/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) | ^~~~~~ /tmp/instance-0/output-1/per-package/tar/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:8:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'? 7 | #include <features.h> +++ |+#include <stddef.h> 8 | Fixes: - http://autobuild.buildroot.org/results/f40e09d621ab5ba66dd97138dec174acfb7fda2a Signed-off-by: Fabrice Fontaine <redacted> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> --- ...-getrandom.c-fix-build-with-uclibc-1.0.35.patch | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+)
diff --git a/package/tar/0001-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch b/package/tar/0001-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch
new file mode 100644
index 0000000000..fe55e4eb4d
--- /dev/null
+++ b/package/tar/0001-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch@@ -0,0 +1,46 @@ +From a0594387565e1e6b4a8a8ba04ad13b135cc1f0b5 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Thu, 1 Apr 2021 07:49:46 +0200 +Subject: [PATCH] lib/getrandom.c: fix build with uclibc < 1.0.35 + +Fix the following build failure with uclibc < 1.0.35 which is raised +since the addition of getrandom module in +https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=682cc4e678aceff32dea2a84b6e5147bdf5a20a7: + +In file included from ./sys/random.h:40, + from getrandom.c:22: +/tmp/instance-0/output-1/per-package/tar/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) + | ^~~~~~ +/tmp/instance-0/output-1/per-package/tar/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:8:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'? + 7 | #include <features.h> + +++ |+#include <stddef.h> + 8 | + +This patch is not upstreamable as it is only a workaround for +uclibc < 1.0.35, upstream uclibc has been patched with +https://github.com/wbx-github/uclibc-ng/commit/00972c02c2b6e0a95d5def4a71bdfb188e091782 + +Fixes: + - http://autobuild.buildroot.org/results/f40e09d621ab5ba66dd97138dec174acfb7fda2a + +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +--- + gnu/getrandom.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gnu/getrandom.c b/gnu/getrandom.c +index 41212fb32..0ad3f9648 100644 +--- a/gnu/getrandom.c ++++ b/gnu/getrandom.c +@@ -19,6 +19,7 @@ + + #include <config.h> + ++#include <stddef.h> + #include <sys/random.h> + + #include <errno.h> +-- +2.30.2 +
_______________________________________________ buildroot mailing list buildroot@busybox.net http://lists.busybox.net/mailman/listinfo/buildroot