summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox/0003-runsv-Use-64-prefix-syscall-if-we-have-to.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/busybox/busybox/0003-runsv-Use-64-prefix-syscall-if-we-have-to.patch')
-rw-r--r--meta/recipes-core/busybox/busybox/0003-runsv-Use-64-prefix-syscall-if-we-have-to.patch46
1 files changed, 0 insertions, 46 deletions
diff --git a/meta/recipes-core/busybox/busybox/0003-runsv-Use-64-prefix-syscall-if-we-have-to.patch b/meta/recipes-core/busybox/busybox/0003-runsv-Use-64-prefix-syscall-if-we-have-to.patch
deleted file mode 100644
index 4760570441..0000000000
--- a/meta/recipes-core/busybox/busybox/0003-runsv-Use-64-prefix-syscall-if-we-have-to.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 8c7419649d6e6fda8fa7d0e863084c78ac728628 Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair.francis@wdc.com>
3Date: Wed, 28 Aug 2019 10:54:15 -0700
4Subject: [PATCH 3/3] runsv: Use 64 prefix syscall if we have to
5
6Some 32-bit architectures no longer have the 32-bit time_t syscalls.
7Instead they have suffixed syscalls that returns a 64-bit time_t. If
8the architecture doesn't have the non-suffixed syscall and is using a
964-bit time_t let's use the suffixed syscall instead.
10
11This fixes build issues when building for RISC-V 32-bit with 5.1+ kernel
12headers.
13
14If an architecture only supports the suffixed syscalls, but is still
15using a 32-bit time_t report a compilation error. This avoids us have to
16deal with converting between 64-bit and 32-bit values. There are
17currently no architectures where this is the case.
18
19Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
20Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=ad27d44ebe950335616f37e36863469dc181b455]
21---
22 runit/runsv.c | 7 +++++++
23 1 file changed, 7 insertions(+)
24
25diff --git a/runit/runsv.c b/runit/runsv.c
26index ccc762d78..737909b0e 100644
27--- a/runit/runsv.c
28+++ b/runit/runsv.c
29@@ -55,7 +55,14 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 * typically requiring -lrt. We just skip all this mess */
31 static void gettimeofday_ns(struct timespec *ts)
32 {
33+#if defined(__NR_clock_gettime)
34 syscall(__NR_clock_gettime, CLOCK_REALTIME, ts);
35+#elif __TIMESIZE == 64
36+ syscall(__NR_clock_gettime64, CLOCK_REALTIME, ts);
37+#else
38+# error "We currently don't support architectures without " \
39+ "the __NR_clock_gettime syscall and 32-bit time_t"
40+#endif
41 }
42 #else
43 static void gettimeofday_ns(struct timespec *ts)
44--
452.22.0
46