mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-01 06:21:56 -09:00
Patch 0005-seedrng-fix-for-glibc-2.24-not-providing-getrandom.patch is dropped as it is upstream as of https://git.busybox.net/busybox/commit/?id=200a9669fbf6f06894e4243cccc9fc11a1a6073a Patch 0006-seedrng-fix-for-glibc-2.24-not-providing-random-head.patch is dropped as it is upstream as of https://git.busybox.net/busybox/commit/?id=cb57abb46f06f4ede8d9ccbdaac67377fdf416cf Patch 0008-shell-fix-SIGWINCH-and-SIGCHLD-in-hush-interrupting-.patch is dropped as it is upstream as of https://git.busybox.net/busybox/commit/?id=93e0898c663a533082b5f3c2e7dcce93ec47076d Patch 0011-awk-fix-use-after-realloc-CVE-2021-42380-closes-1560.patch is dropped as it is upstream as of https://git.busybox.net/busybox/commit/?id=5dcc443dba039b305a510c01883e9f34e42656ae Patch 0012-awk-fix-use-after-free-CVE-2023-42363.patch is dropped as it is upstream as of https://git.busybox.net/busybox/commit/?id=fb08d43d44d1fea1f741fafb9aa7e1958a5f69aa Patch 0013-awk-fix-precedence-of-relative-to.patch is dropped as it is upstream as of https://git.busybox.net/busybox/commit/?id=0256e00a9d077588bd3a39f5a1ef7e2eaa2911e4 Patch 0014-awk-fix-ternary-operator-and-precedence-of.patch is dropped as it is upstream as of https://git.busybox.net/busybox/commit/?id=38335df9e9f45378c3407defd38b5b610578bdda Remaining patches are renumbered/refreshed. Patch 0010-libbb-sha-add-missing-sha-NI-guard.patch is added, taken from the mailing list, to fix a build issue. Patch 0011-syslogd-fix-wrong-OPT_locallog-flag-detection.patch, taken from the mailing list, is added to fix a runtime issue with syslogd which was pointed out by Bernd Kulhs. Signed-off-by: Clement Ramirez <clement@clementramirez.fr> [Thomas: update with more patches being dropped, renumber patches, backport some patches needed to fix known build and runtime issues] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
55 lines
2.1 KiB
Diff
55 lines
2.1 KiB
Diff
From 0583f8eda94f97e15e371e12458877b738439e8c Mon Sep 17 00:00:00 2001
|
|
From: Khem Raj <raj.khem@gmail.com>
|
|
Date: Sun, 7 Mar 2021 17:30:24 -0800
|
|
Subject: [PATCH] hwclock: Check for SYS_settimeofday before calling syscall
|
|
|
|
Some newer architectures e.g. RISCV32 have 64bit time_t from get go and
|
|
thusly do not have gettimeofday_time64/settimeofday_time64 implemented
|
|
therefore check for SYS_settimeofday definition before making the
|
|
syscall. Fixes build for riscv32 and it will bail out at runtime.
|
|
|
|
Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2021-March/088583.html]
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
Upstream: http://lists.busybox.net/pipermail/busybox/2021-March/088583.html
|
|
[Thomas: this issue has been discussed on the musl mailing list, and
|
|
the musl developers' opinion is that Busybox is wrong:
|
|
https://www.openwall.com/lists/musl/2024/03/03/2
|
|
https://www.openwall.com/lists/musl/2024/04/07/2. The correct fix
|
|
isn't clear, and in the mean time, the patch from Khem turns the build
|
|
issue into a runtime error only on the problematic architecture, which
|
|
seems like a reasonable trade-off]
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
|
---
|
|
util-linux/hwclock.c | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
|
|
index c3fd0eb57..dea9c9a55 100644
|
|
--- a/util-linux/hwclock.c
|
|
+++ b/util-linux/hwclock.c
|
|
@@ -132,6 +132,7 @@ static void show_clock(const char **pp_rtcname, int utc)
|
|
|
|
static void set_kernel_tz(const struct timezone *tz)
|
|
{
|
|
+ int ret = 1;
|
|
#if LIBC_IS_MUSL
|
|
/* musl libc does not pass tz argument to syscall
|
|
* because "it's deprecated by POSIX, therefore it's fine
|
|
@@ -140,9 +141,11 @@ static void set_kernel_tz(const struct timezone *tz)
|
|
#if !defined(SYS_settimeofday) && defined(SYS_settimeofday_time32)
|
|
# define SYS_settimeofday SYS_settimeofday_time32
|
|
#endif
|
|
- int ret = syscall(SYS_settimeofday, NULL, tz);
|
|
+#if defined(SYS_settimeofday)
|
|
+ ret = syscall(SYS_settimeofday, NULL, tz);
|
|
+#endif
|
|
#else
|
|
- int ret = settimeofday(NULL, tz);
|
|
+ ret = settimeofday(NULL, tz);
|
|
#endif
|
|
if (ret)
|
|
bb_simple_perror_msg_and_die("settimeofday");
|
|
--
|
|
2.48.1
|
|
|