summaryrefslogtreecommitdiff
path: root/sysdeps/unix/clock_gettime.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2017-09-25 01:55:02 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2017-09-25 01:55:02 +0200
commitfcafcd162c843364dc2bb8d57bd239c41cfd122c (patch)
treee374c7841085366fc78a92f6a66334adb36a8365 /sysdeps/unix/clock_gettime.c
parent6174537c24cfe324d6e8f5a2a421883df12b8b6a (diff)
hurd: Fix exposition of s/gettimeofday through timespec_s/get
conform/ISO11/time.h/linknamespace complains that using timespec_get exposes gettimeofday. conform/POSIX/time.h/linknamespace complains that using clock_settime exposes settimeofday. * sysdeps/unix/clock_gettime.c (realtime_gettime, __clock_gettime): Use __gettimeofday instead of gettimeofday. * sysdeps/unix/clock_settime.c (__clock_settime): Use __settimeofday instead of settimeofday.
Diffstat (limited to 'sysdeps/unix/clock_gettime.c')
-rw-r--r--sysdeps/unix/clock_gettime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
index 5262066f51..c4cf49367e 100644
--- a/sysdeps/unix/clock_gettime.c
+++ b/sysdeps/unix/clock_gettime.c
@@ -79,7 +79,7 @@ static inline int
realtime_gettime (struct timespec *tp)
{
struct timeval tv;
- int retval = gettimeofday (&tv, NULL);
+ int retval = __gettimeofday (&tv, NULL);
if (retval == 0)
/* Convert into `timespec'. */
TIMEVAL_TO_TIMESPEC (&tv, tp);
@@ -103,7 +103,7 @@ __clock_gettime (clockid_t clock_id, struct timespec *tp)
case CLOCK_REALTIME:
{
struct timeval tv;
- retval = gettimeofday (&tv, NULL);
+ retval = __gettimeofday (&tv, NULL);
if (retval == 0)
TIMEVAL_TO_TIMESPEC (&tv, tp);
}