about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/time.c2
-rw-r--r--sysdeps/unix/sysv/linux/time-clockid.h (renamed from sysdeps/unix/sysv/linux/time.c)31
2 files changed, 7 insertions, 26 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/time.c b/sysdeps/unix/sysv/linux/powerpc/time.c
index c35b80fad1..e957b81751 100644
--- a/sysdeps/unix/sysv/linux/powerpc/time.c
+++ b/sysdeps/unix/sysv/linux/powerpc/time.c
@@ -78,6 +78,6 @@ libc_hidden_def (time)
 
 #else
 
-#include <sysdeps/posix/time.c>
+#include <time/time.c>
 
 #endif /* !SHARED */
diff --git a/sysdeps/unix/sysv/linux/time.c b/sysdeps/unix/sysv/linux/time-clockid.h
index f461733678..1bdaa18094 100644
--- a/sysdeps/unix/sysv/linux/time.c
+++ b/sysdeps/unix/sysv/linux/time-clockid.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
+/* System specific time definitions.  Generic Version.
+   Copyright 2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -15,27 +16,7 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <stddef.h>
-#include <time.h>
-
-#include <sysdep.h>
-
-#ifdef __NR_time
-
-time_t
-time (time_t *t)
-{
-  INTERNAL_SYSCALL_DECL (err);
-  time_t res = INTERNAL_SYSCALL (time, err, 1, NULL);
-  /* There cannot be any error.  */
-  if (t != NULL)
-    *t = res;
-  return res;
-}
-libc_hidden_def (time)
-
-#else
-
-# include <sysdeps/posix/time.c>
-
-#endif
+/* Timer used on clock_gettime for time implementation.  For Linux
+   it uses the coarse version which returns the time at the last tick
+   and mimic what time as syscall should return.  */
+#define TIME_CLOCK_GETTIME_CLOCKID CLOCK_REALTIME_COARSE