summaryrefslogtreecommitdiffstats
path: root/package/openntpd/0001-fix-musl.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-12-01 21:56:44 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-12-01 21:56:44 +0100
commit1c8dda3e435cfadaffe1f0cc062ad3c8ffbe84a7 (patch)
treedd26d5bc619271f8cccf0c9d7abdda9a1749d13f /package/openntpd/0001-fix-musl.patch
parent57dcad243e6daefefbe21109e1fc97272053a7a0 (diff)
parent787a31fed42f98a8e2e6a0bd2079376c861436f2 (diff)
downloadbuildroot-1c8dda3e435cfadaffe1f0cc062ad3c8ffbe84a7.tar.gz
buildroot-1c8dda3e435cfadaffe1f0cc062ad3c8ffbe84a7.zip
Merge branch 'next'
This merges the next branch accumulated during the 2017.11 release cycle back into the master branch. A few conflicts had to be resolved: - In the DEVELOPERS file, because Fabrice Fontaine was added as a developer for libupnp in master, and for libupnp18 in next. Resolution is simple: add him for both. - linux/Config.in, because we updated the 4.13.x release used by default in master, while we moved to 4.14 in next. Resolution: use 4.14. - package/libupnp/libupnp.hash: a hash for the license file was added in master, while the package was bumped into next. Resolution: keep the hash for the license file, and keep the hash for the newest version of libupnp. - package/linux-headers/Config.in.host: default version of the kernel headers for 4.13 was bumped to the latest 4.13.x in master, but was changed to 4.14 in next. Resolution: use 4.14. - package/samba4/: samba was bumped to 4.6.11 in master for security reasons, but was bumped to 4.7.3 in next. Resolution: keep 4.7.3. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/openntpd/0001-fix-musl.patch')
-rw-r--r--package/openntpd/0001-fix-musl.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/openntpd/0001-fix-musl.patch b/package/openntpd/0001-fix-musl.patch
new file mode 100644
index 0000000000..e369d5a8ae
--- /dev/null
+++ b/package/openntpd/0001-fix-musl.patch
@@ -0,0 +1,38 @@
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Fri, 29 Sep 2017 10:06:52 +0300
+Subject: [PATCH] Fix build with musl and older Linux kernel
+
+The musl libc carries its own copy of Linux system calls. When building
+with Linux headers older than v3.17, musl provides SYS_getrandom
+definition, but not GRND_NONBLOCK. This causes build failure for
+libressl and openntpd:
+
+getentropy_linux.c: In function 'getentropy_getrandom':
+getentropy_linux.c:205:42: error: 'GRND_NONBLOCK' undeclared (first use in this function)
+ ret = syscall(SYS_getrandom, buf, len, GRND_NONBLOCK);
+ ^~~~~~~~~~~~~
+
+Define GRND_NONBLOCK locally when its definition is missing to fix the
+build. There should be no run-time effect. Older kernels return ENOSYS
+for unsupported syscall().
+
+[ from upstream pull request with file location changed ]
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: https://github.com/libressl-portable/openbsd/pull/82
+
+diff -Nuar openntpd-6.2p2-orig/compat/getentropy_linux.c openntpd-6.2p2/compat/getentropy_linux.c
+--- openntpd-6.2p2-orig/compat/getentropy_linux.c 2017-09-07 22:12:02.000000000 +0300
++++ openntpd-6.2p2/compat/getentropy_linux.c 2017-09-29 11:54:54.856245770 +0300
+@@ -194,6 +194,11 @@
+ }
+
+ #ifdef SYS_getrandom
++
++#ifndef GRND_NONBLOCK
++#define GRND_NONBLOCK 0x0001
++#endif
++
+ static int
+ getentropy_getrandom(void *buf, size_t len)
+ {
OpenPOWER on IntegriCloud