aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sys/stat.h2
-rw-r--r--include/time.h12
2 files changed, 11 insertions, 3 deletions
diff --git a/include/sys/stat.h b/include/sys/stat.h
index b4c9344..13e777b 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -46,7 +46,7 @@ hidden_proto (__lstat64)
hidden_proto (__fstatat64)
# endif
-# if __TIMESIZE == 64
+# if __TIMESIZE == 64 || defined NO_RTLD_HIDDEN
# define __stat64_time64 __stat64
# define __fstat64_time64 __fstat64
# define __lstat64_time64 __lstat64
diff --git a/include/time.h b/include/time.h
index 4372bfb..980c6bd 100644
--- a/include/time.h
+++ b/include/time.h
@@ -283,8 +283,8 @@ hidden_proto (__nanosleep64)
#endif
-extern int __getdate_r (const char *__string, struct tm *__resbufp)
- attribute_hidden;
+extern int __getdate_r (const char *__string, struct tm *__resbufp);
+libc_hidden_proto (__getdate_r);
/* Determine CLK_TCK value. */
@@ -509,6 +509,14 @@ time_now (void)
return ts.tv_sec;
}
+static inline __time64_t
+time64_now (void)
+{
+ struct __timespec64 ts;
+ __clock_gettime64 (TIME_CLOCK_GETTIME_CLOCKID, &ts);
+ return ts.tv_sec;
+}
+
#define NSEC_PER_SEC 1000000000L /* Nanoseconds per second. */
#define USEC_PER_SEC 1000000L /* Microseconds per second. */
#define NSEC_PER_USEC 1000L /* Nanoseconds per microsecond. */