From 2e44b10b42d68d9887ccab17b76db5d7bbae4fb6 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Fri, 21 Jun 2019 13:00:23 -0700 Subject: 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. --- include/time.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/time.h') diff --git a/include/time.h b/include/time.h index b3e635395d..d7800eb30f 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. */ -- cgit v1.2.3