diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2019-06-21 13:00:23 -0700 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2019-11-08 12:06:17 -0800 |
commit | 2e44b10b42d68d9887ccab17b76db5d7bbae4fb6 (patch) | |
tree | 5cd43380331eb69cb510135f03fcf571aca8b31f /include/time.h | |
parent | 31f000a8a65932bb34f8995f54297486c91648c3 (diff) | |
download | glibc-2e44b10b42d68d9887ccab17b76db5d7bbae4fb6.tar glibc-2e44b10b42d68d9887ccab17b76db5d7bbae4fb6.tar.gz glibc-2e44b10b42d68d9887ccab17b76db5d7bbae4fb6.tar.bz2 glibc-2e44b10b42d68d9887ccab17b76db5d7bbae4fb6.zip |
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/time.h')
-rw-r--r-- | include/time.h | 8 |
1 files changed, 8 insertions, 0 deletions
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. */ |