33 lines
882 B
Diff
33 lines
882 B
Diff
From 86bb9837e03382a6915ccadee6803daf367f2fd0 Mon Sep 17 00:00:00 2001
|
|
From: Said Musaev <cpu808694@gmail.com>
|
|
Date: Thu, 1 Oct 2020 20:22:20 +0200
|
|
Subject: [PATCH 07/14] libstdc++-futex
|
|
|
|
---
|
|
libstdc++-v3/src/c++11/futex.cc | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/libstdc++-v3/src/c++11/futex.cc b/libstdc++-v3/src/c++11/futex.cc
|
|
index c9de11a7ec7..7be702dbeda 100644
|
|
--- a/libstdc++-v3/src/c++11/futex.cc
|
|
+++ b/libstdc++-v3/src/c++11/futex.cc
|
|
@@ -61,7 +61,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
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)
|
|
--
|
|
2.28.0
|
|
|