mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
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.
This commit is contained in:
@ -17,6 +17,10 @@
|
|||||||
* bits/socket.h: Likewise.
|
* bits/socket.h: Likewise.
|
||||||
* support/resolv_test.c (server_thread_udp_process_one): Call recvfrom
|
* support/resolv_test.c (server_thread_udp_process_one): Call recvfrom
|
||||||
instead of xrecvfrom, and ignore ECONNREFUSED errors.
|
instead of xrecvfrom, and ignore ECONNREFUSED errors.
|
||||||
|
* 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.
|
||||||
|
|
||||||
2017-09-22 Joseph Myers <joseph@codesourcery.com>
|
2017-09-22 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ static inline int
|
|||||||
realtime_gettime (struct timespec *tp)
|
realtime_gettime (struct timespec *tp)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
int retval = gettimeofday (&tv, NULL);
|
int retval = __gettimeofday (&tv, NULL);
|
||||||
if (retval == 0)
|
if (retval == 0)
|
||||||
/* Convert into `timespec'. */
|
/* Convert into `timespec'. */
|
||||||
TIMEVAL_TO_TIMESPEC (&tv, tp);
|
TIMEVAL_TO_TIMESPEC (&tv, tp);
|
||||||
@ -103,7 +103,7 @@ __clock_gettime (clockid_t clock_id, struct timespec *tp)
|
|||||||
case CLOCK_REALTIME:
|
case CLOCK_REALTIME:
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
retval = gettimeofday (&tv, NULL);
|
retval = __gettimeofday (&tv, NULL);
|
||||||
if (retval == 0)
|
if (retval == 0)
|
||||||
TIMEVAL_TO_TIMESPEC (&tv, tp);
|
TIMEVAL_TO_TIMESPEC (&tv, tp);
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ __clock_settime (clockid_t clock_id, const struct timespec *tp)
|
|||||||
struct timeval tv; \
|
struct timeval tv; \
|
||||||
TIMESPEC_TO_TIMEVAL (&tv, tp); \
|
TIMESPEC_TO_TIMEVAL (&tv, tp); \
|
||||||
\
|
\
|
||||||
retval = settimeofday (&tv, NULL); \
|
retval = __settimeofday (&tv, NULL); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#ifdef SYSDEP_SETTIME
|
#ifdef SYSDEP_SETTIME
|
||||||
|
Reference in New Issue
Block a user