aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2019-06-21 13:00:23 -0700
committerAlistair Francis <alistair.francis@wdc.com>2019-11-08 12:06:17 -0800
commit2e44b10b42d68d9887ccab17b76db5d7bbae4fb6 (patch)
tree5cd43380331eb69cb510135f03fcf571aca8b31f /include
parent31f000a8a65932bb34f8995f54297486c91648c3 (diff)
downloadglibc-2e44b10b42d68d9887ccab17b76db5d7bbae4fb6.zip
glibc-2e44b10b42d68d9887ccab17b76db5d7bbae4fb6.tar.gz
glibc-2e44b10b42d68d9887ccab17b76db5d7bbae4fb6.tar.bz2
sysdeps/clock_nanosleep: Use clock_nanosleep_time64 if avaliable
The clock_nanosleep syscall is not supported on newer 32-bit platforms (such as RV32). To fix this issue let's use clock_nanosleep_time64 if it is avaliable.
Diffstat (limited to 'include')
-rw-r--r--include/time.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h
index b3e6353..d7800eb 100644
--- a/include/time.h
+++ b/include/time.h
@@ -209,6 +209,14 @@ libc_hidden_proto (__difftime64)
extern double __difftime (time_t time1, time_t time0);
+#if __TIMESIZE == 64
+# define __clock_nanosleep_time64 __clock_nanosleep
+#else
+extern int __clock_nanosleep_time64 (clockid_t clock_id,
+ int flags, const struct __timespec64 *req,
+ struct __timespec64 *rem);
+libc_hidden_proto (__clock_nanosleep_time64)
+#endif
/* Use in the clock_* functions. Size of the field representing the
actual clock ID. */