diff options
Diffstat (limited to 'meta/recipes-core/busybox/busybox/0001-time-Use-64-prefix-syscall-if-we-have-to.patch')
-rw-r--r-- | meta/recipes-core/busybox/busybox/0001-time-Use-64-prefix-syscall-if-we-have-to.patch | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/meta/recipes-core/busybox/busybox/0001-time-Use-64-prefix-syscall-if-we-have-to.patch b/meta/recipes-core/busybox/busybox/0001-time-Use-64-prefix-syscall-if-we-have-to.patch deleted file mode 100644 index 58a6c0d8a0..0000000000 --- a/meta/recipes-core/busybox/busybox/0001-time-Use-64-prefix-syscall-if-we-have-to.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 902d3992922fc8db8495d5fb30a4581711b60c62 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Wed, 18 Sep 2019 09:28:50 -0700 | ||
4 | Subject: [PATCH] time: Use 64 prefix syscall if we have to | ||
5 | |||
6 | Some 32-bit architectures no longer have the 32-bit time_t syscalls. | ||
7 | Instead they have suffixed syscalls that returns a 64-bit time_t. If | ||
8 | the architecture doesn't have the non-suffixed syscall and is using a | ||
9 | 64-bit time_t let's use the suffixed syscall instead. | ||
10 | |||
11 | This fixes build issues when building for RISC-V 32-bit with 5.1+ kernel | ||
12 | headers. | ||
13 | |||
14 | If an architecture only supports the suffixed syscalls, but is still | ||
15 | using a 32-bit time_t report a compilation error. This avoids us have to | ||
16 | deal with converting between 64-bit and 32-bit values. There are | ||
17 | currently no architectures where this is the case. | ||
18 | |||
19 | Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=902d3992922fc8db8495d5fb30a4581711b60c62] | ||
20 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
21 | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||
22 | --- | ||
23 | libbb/time.c | 7 +++++++ | ||
24 | 1 file changed, 7 insertions(+) | ||
25 | |||
26 | --- a/libbb/time.c | ||
27 | +++ b/libbb/time.c | ||
28 | @@ -257,7 +257,14 @@ char* FAST_FUNC strftime_YYYYMMDDHHMMSS( | ||
29 | * typically requiring -lrt. We just skip all this mess */ | ||
30 | static void get_mono(struct timespec *ts) | ||
31 | { | ||
32 | - if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, ts)) | ||
33 | +#if defined(__NR_clock_gettime) | ||
34 | + if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, ts)) | ||
35 | +#elif __TIMESIZE == 64 | ||
36 | + if (syscall(__NR_clock_gettime64, CLOCK_MONOTONIC, 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 | bb_error_msg_and_die("clock_gettime(MONOTONIC) failed"); | ||
42 | } | ||
43 | unsigned long long FAST_FUNC monotonic_ns(void) | ||