git-clock_gettime_gettimeofday
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sun, 14 Jan 2018 10:24:48 +0000 (10:24 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sun, 14 Jan 2018 10:24:48 +0000 (10:24 +0000)
commit fcafcd162c843364dc2bb8d57bd239c41cfd122c
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Sep 25 01:55:02 2017 +0200

    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.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-clock_gettime_gettimeofday.diff

sysdeps/unix/clock_gettime.c
sysdeps/unix/clock_settime.c

index 5262066f51dbad0730dacde03e049aac43342209..c4cf49367ee55c3ff27726ac65eafe6e9e3f34a4 100644 (file)
@@ -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);
       }
index e744cae6a9cfaaf5cc9176b26b92a1c79fa0e1e0..067e279e2afe40445bde2dff1cd97b5dd5ec4371 100644 (file)
@@ -89,7 +89,7 @@ __clock_settime (clockid_t clock_id, const struct timespec *tp)
        struct timeval tv;                                                    \
        TIMESPEC_TO_TIMEVAL (&tv, tp);                                        \
                                                                              \
-       retval = settimeofday (&tv, NULL);                                    \
+       retval = __settimeofday (&tv, NULL);                                  \
       } while (0)
 
 #ifdef SYSDEP_SETTIME