From c085deae94a6fbd3d113eaceaaee4f0f947e091d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Tue, 9 Feb 2021 12:41:30 +0100 Subject: [PATCH] busybox: fix build w/ musl-1.2.2 (time64) --- srcpkgs/busybox/patches/time64.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 srcpkgs/busybox/patches/time64.patch diff --git a/srcpkgs/busybox/patches/time64.patch b/srcpkgs/busybox/patches/time64.patch new file mode 100644 index 00000000000..b38f4dcb97e --- /dev/null +++ b/srcpkgs/busybox/patches/time64.patch @@ -0,0 +1,28 @@ +--- coreutils/date.c 2019-06-10 12:50:53.000000000 +0200 ++++ coreutils/date.c 2021-02-09 12:39:19.127054192 +0100 +@@ -274,7 +274,11 @@ + #if ENABLE_FEATURE_DATE_NANO + /* libc has incredibly messy way of doing this, + * typically requiring -lrt. We just skip all this mess */ ++#if defined(__NR_clock_gettime32) ++ syscall(__NR_clock_gettime32, CLOCK_REALTIME, &ts); ++#else + syscall(__NR_clock_gettime, CLOCK_REALTIME, &ts); ++#endif + #else + time(&ts.tv_sec); + #endif +--- libbb/time.c 2019-06-10 12:50:53.000000000 +0200 ++++ libbb/time.c 2021-02-09 12:35:35.125037118 +0100 +@@ -257,7 +257,11 @@ + * typically requiring -lrt. We just skip all this mess */ + static void get_mono(struct timespec *ts) + { ++#if defined(__NR_clock_gettime32) ++ if (syscall(__NR_clock_gettime32, CLOCK_MONOTONIC, ts)) ++#else + if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, ts)) ++#endif + bb_error_msg_and_die("clock_gettime(MONOTONIC) failed"); + } + unsigned long long FAST_FUNC monotonic_ns(void)