From c3a020eedde907e7df69159a54bf59d39db85709 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Sun, 12 Jul 2020 14:55:30 -0300 Subject: linux: Add time64 support for nanosleep It uses __clock_nanosleep64 and adds the __nanosleep64 symbol. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Alistair Francis --- include/time.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/time.h b/include/time.h index 936486e206..edf6cdf829 100644 --- a/include/time.h +++ b/include/time.h @@ -271,6 +271,15 @@ extern struct tm *__tz_convert (__time64_t timer, int use_localtime, extern int __nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); hidden_proto (__nanosleep) +#if __TIMESIZE == 64 +# define __nanosleep64 __nanosleep +#else +extern int __nanosleep64 (const struct __timespec64 *__requested_time, + struct __timespec64 *__remaining); +hidden_proto (__nanosleep64) +#endif + + extern int __getdate_r (const char *__string, struct tm *__resbufp) attribute_hidden; -- cgit v1.2.3