pmaports/cross/gcc-aarch64/futex-time64.patch
Danct12 d1640538ec
cross/gcc-*: upgrade to 9.3.0-r3 (MR 1299)
Bring the GCC packages up to date with upstream.
This adds a patch for time64 compatible futext syscall, it is needed for musl 1.2
which makes our little phones works after 2038.

Upstream commits:
- c6536bc29a
- 30ddf1b3c4

[ci:skip-build]

Signed-off-by: Danct12 <danct12@disroot.org>
2020-06-11 09:11:10 +02:00

21 lines
639 B
Diff

needed for musl 1.2 and time64.
Upstream bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93421
--- gcc-9.2.0/libstdc++-v3/src/c++11/futex.cc.orig 2020-01-20 14:55:05.507548334 -0500
+++ gcc-9.2.0/libstdc++-v3/src/c++11/futex.cc 2020-01-20 14:56:52.458268068 -0500
@@ -61,7 +61,15 @@
struct timeval tv;
gettimeofday (&tv, NULL);
// Convert the absolute timeout value to a relative timeout
+#if defined(SYS_futex_time64)
+ struct
+ {
+ long tv_sec;
+ long tv_nsec;
+ } rt;
+#else
struct timespec rt;
+#endif
rt.tv_sec = __s.count() - tv.tv_sec;
rt.tv_nsec = __ns.count() - tv.tv_usec * 1000;
if (rt.tv_nsec < 0)