Skip to contentSkip to conversation

package/wget: fix build with uclibc < 1.0.35

PATCH New Fabrice Fontaine 2 participants 2 messages Apr 1, 2021 – Apr 4, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/wget: fix build with uclibc < 1.0.35

Build of wget with uclibc < 1.0.35 is broken since bump to version 1.21.1 in commit 89a3f73910402ed40066eed076d5a53ac270307c

Fixes:
- http://autobuild.buildroot.org/results/d507f8d8ae4dd6aac1e83b7cc81017caf0d2c30e

---
 ...andom.c-fix-build-with-uclibc-1.0.35.patch | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/wget/0001-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch
package/wget/0001-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch new file +46 -0
new file mode 100644
index 0000000000..dd4b01f189
@@ -0,0 +1,46 @@
+From a0594387565e1e6b4a8a8ba04ad13b135cc1f0b5 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+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:
+/home/fabrice/buildroot/output/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)
+      |                                   ^~~~~~
+/home/fabrice/buildroot/output/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/d507f8d8ae4dd6aac1e83b7cc81017caf0d2c30e
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ lib/getrandom.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/getrandom.c b/lib/getrandom.c
+index 41212fb32..0ad3f9648 100644
+--- a/lib/getrandom.c
++++ b/lib/getrandom.c
+@@ -19,6 +19,7 @@
+ 
+ #include <config.h>
+ 
++#include <stddef.h>
+ #include <sys/random.h>
+ 
+ #include <errno.h>
+-- 
+2.30.2
+
Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/1 package/wget: fix build with uclibc < 1.0.35

Quoted 11 lines · On Thu, 1 Apr 2021 08:02:22 +0200 Fabrice Fontaine…

Build of wget with uclibc < 1.0.35 is broken since bump to version 1.21.1 in commit 89a3f73910402ed40066eed076d5a53ac270307c

Fixes:
- http://autobuild.buildroot.org/results/d507f8d8ae4dd6aac1e83b7cc81017caf0d2c30e

---
 ...andom.c-fix-build-with-uclibc-1.0.35.patch | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/wget/0001-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com