diff options
Diffstat (limited to 'package/busybox/patches')
4 files changed, 105 insertions, 0 deletions
diff --git a/package/busybox/patches/002-hwclock-musl.patch b/package/busybox/patches/002-hwclock-musl.patch new file mode 100644 index 000000000..a5b9ff50d --- /dev/null +++ b/package/busybox/patches/002-hwclock-musl.patch @@ -0,0 +1,31 @@ +diff -Nur busybox-1.36.1.orig/util-linux/hwclock.c busybox-1.36.1/util-linux/hwclock.c +--- busybox-1.36.1.orig/util-linux/hwclock.c 2021-01-01 11:52:27.000000000 +0100 ++++ busybox-1.36.1/util-linux/hwclock.c 2024-04-10 11:18:06.569673535 +0200 +@@ -136,10 +136,24 @@ + * because "it's deprecated by POSIX, therefore it's fine + * if we gratuitously break stuff" :( + */ +-#if !defined(SYS_settimeofday) && defined(SYS_settimeofday_time32) +-# define SYS_settimeofday SYS_settimeofday_time32 +-#endif ++# if !defined(SYS_settimeofday) && defined(SYS_settimeofday_time32) ++# define SYS_settimeofday SYS_settimeofday_time32 ++# endif ++# if defined(SYS_settimeofday) + int ret = syscall(SYS_settimeofday, NULL, tz); ++# else ++ /* Some new architectures have neither settimeofday nor ++ * settimeofday_time32, and the whole kernel timezone handling appears ++ * to have been dropped due to some oddities in the API. See: ++ * ++ * - glibc's commit c3f9aef063 ("Use clock_settime to implement settimeofday.") ++ * - https://github.com/systemd/systemd/issues/13305 ++ * - https://inbox.sourceware.org/libc-alpha/cb015d0d1d29e4b948c7118c5b12ff2bed83a6ec.1561421042.git.alistair.francis@wdc.com/ ++ * ++ * So instead just silently drop these calls. ++ */ ++ int ret = -ENOSYS; ++# endif + #else + int ret = settimeofday(NULL, tz); + #endif diff --git a/package/busybox/patches/004-libbb-sha-add-missing-guard.patch b/package/busybox/patches/004-libbb-sha-add-missing-guard.patch new file mode 100644 index 000000000..ec41ba73a --- /dev/null +++ b/package/busybox/patches/004-libbb-sha-add-missing-guard.patch @@ -0,0 +1,17 @@ +diff --git a/libbb/hash_md5_sha.c b/libbb/hash_md5_sha.c +index 57a801459..75a61c32c 100644 +--- a/libbb/hash_md5_sha.c ++++ b/libbb/hash_md5_sha.c +@@ -1313,7 +1313,9 @@ unsigned FAST_FUNC sha1_end(sha1_ctx_t *ctx, void *resbuf) + hash_size = 8; + if (ctx->process_block == sha1_process_block64 + #if ENABLE_SHA1_HWACCEL ++# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + || ctx->process_block == sha1_process_block64_shaNI ++# endif + #endif + ) { + hash_size = 5; +-- +2.48.1 + diff --git a/package/busybox/patches/005-syslogd-fix-wrong-OPT_localog-flag-detection.patch b/package/busybox/patches/005-syslogd-fix-wrong-OPT_localog-flag-detection.patch new file mode 100644 index 000000000..1dfd6f379 --- /dev/null +++ b/package/busybox/patches/005-syslogd-fix-wrong-OPT_localog-flag-detection.patch @@ -0,0 +1,37 @@ +From 34d331d642c3312e1c04e4650f547f1a67abee24 Mon Sep 17 00:00:00 2001 +From: Andrej Valek <andrej.v@skyrain.eu> +Date: Wed, 16 Oct 2024 10:15:08 +0200 +Subject: [PATCH] syslogd: fix wrong OPT_locallog flag detection + +The OPT_locallog was set on "option_mask32" but checked on local +"opts" variable. While this flag it's used on multiple places can't be +has to be used with "option_mask32". Without this change syslogd +is more-less unusable while no messages are logged locally. + +Signed-off-by: Andrej Valek <andrej.v@skyrain.eu> +Upstream: https://lists.busybox.net/pipermail/busybox/2024-October/090969.html +[Thomas: this was reported as beeing needed by Bernd Kuhls at +https://lore.kernel.org/buildroot/pan$de0bb$35c5a64$ca9b6f21$2408ff40@ID-313208.user.individual.net/, +but also on the Busybox mailing list at +https://lists.busybox.net/pipermail/busybox/2023-September/090499.html] +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> +--- + sysklogd/syslogd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c +index 7558051f0..fa03aa280 100644 +--- a/sysklogd/syslogd.c ++++ b/sysklogd/syslogd.c +@@ -1179,7 +1179,7 @@ int syslogd_main(int argc UNUSED_PARAM, char **argv) + } + } + #endif +- if (!ENABLE_FEATURE_REMOTE_LOG || (opts & OPT_locallog)) { ++ if (!ENABLE_FEATURE_REMOTE_LOG || (option_mask32 & OPT_locallog)) { + recvbuf[sz] = '\0'; /* ensure it *is* NUL terminated */ + split_escape_and_log(recvbuf, sz); + } +-- +2.48.1 + diff --git a/package/busybox/patches/009-disable-Oz.patch b/package/busybox/patches/009-disable-Oz.patch new file mode 100644 index 000000000..11830586f --- /dev/null +++ b/package/busybox/patches/009-disable-Oz.patch @@ -0,0 +1,20 @@ +diff -Nur busybox-1.36.1.orig/Makefile.flags busybox-1.36.1/Makefile.flags +--- busybox-1.36.1.orig/Makefile.flags 2023-01-03 15:14:43.000000000 +0100 ++++ busybox-1.36.1/Makefile.flags 2023-07-30 15:24:31.983113101 +0200 +@@ -87,14 +87,14 @@ + #CFLAGS += $(call cc-option,-Wconversion,) + + ifneq ($(CONFIG_DEBUG),y) +-CFLAGS += $(call cc-option,-Oz,$(call cc-option,-Os,$(call cc-option,-O2,))) ++CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,)) + else + CFLAGS += $(call cc-option,-g,) + #CFLAGS += "-D_FORTIFY_SOURCE=2" + ifeq ($(CONFIG_DEBUG_PESSIMIZE),y) + CFLAGS += $(call cc-option,-O0,) + else +-CFLAGS += $(call cc-option,-Oz,$(call cc-option,-Os,$(call cc-option,-O2,))) ++CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,)) + endif + endif + ifeq ($(CONFIG_DEBUG_SANITIZE),y) |