From 36d9ed360a34531a10883e750f076f7d76dd54fd Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 7 Aug 2020 14:23:39 -0700 Subject: util-linux: update to 2.36 hwclock was fixed to work with musl. Unfortunately, the fix breaks under musl 1.2.x. Backported patch to fix that. Signed-off-by: Rosen Penev --- .../utils/util-linux/patches/200-musl-1.2.x.patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 package/utils/util-linux/patches/200-musl-1.2.x.patch (limited to 'package/utils/util-linux/patches/200-musl-1.2.x.patch') diff --git a/package/utils/util-linux/patches/200-musl-1.2.x.patch b/package/utils/util-linux/patches/200-musl-1.2.x.patch new file mode 100644 index 0000000000..658b3ead1d --- /dev/null +++ b/package/utils/util-linux/patches/200-musl-1.2.x.patch @@ -0,0 +1,26 @@ +From 69e4fbfbfd9c42af508954d9fb985c5c7b657784 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 11 Aug 2020 11:02:31 +0200 +Subject: [PATCH] hwclock: add fallback if SYS_settimeofday does not exist + +It seems Musl-C removes SYS_settimeofday macro at all. + +Addresses: https://github.com/karelzak/util-linux/commit/9c6139a72017cecb9145e46102152cb4f456ada6#commitcomment-41290951 +Signed-off-by: Karel Zak +--- + sys-utils/hwclock.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/sys-utils/hwclock.c ++++ b/sys-utils/hwclock.c +@@ -675,6 +675,10 @@ display_time(struct timeval hwctime) + */ + #define __set_time(_tv) settimeofday(_tv, NULL) + ++#if !defined(SYS_settimeofday) && defined(__NR_settimeofday) ++# define SYS_settimeofday __NR_settimeofday ++#endif ++ + static inline int __set_timezone(const struct timezone *tz) + { + #ifdef SYS_settimeofday -- cgit v1.2.3