As the timespec_compare is used locally in glibc, its name shall begin with
"__". This change adds this prefix.
Tested with glibc/glibc-many-build --keep failed glibcs
---
sysdeps/pthread/posix-timer.h | 2 +-
sysdeps/pthread/timer_gettime.c | 2 +-
sysdeps/pthread/timer_routines.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
@@ -115,7 +115,7 @@ timer_delref (struct timer_node *timer)
/* Timespec helper routines. */
static inline int
__attribute ((always_inline))
-timespec_compare (const struct timespec *left, const struct timespec *right)
+__timespec_compare (const struct timespec *left, const struct timespec *right)
{
if (left->tv_sec < right->tv_sec)
return -1;
@@ -51,7 +51,7 @@ timer_gettime (timer_t timerid, struct itimerspec *value)
if (armed)
{
__clock_gettime (clock, &now);
- if (timespec_compare (&now, &expiry) < 0)
+ if (__timespec_compare (&now, &expiry) < 0)
timespec_sub (&value->it_value, &expiry, &now);
else
{
@@ -383,7 +383,7 @@ thread_func (void *arg)
/* If the timer is due or overdue, remove it from the queue.
If it's a periodic timer, re-compute its new time and
requeue it. Either way, perform the timer expiry. */
- if (timespec_compare (&now, &timer->expirytime) < 0)
+ if (__timespec_compare (&now, &timer->expirytime) < 0)
break;
list_unlink_ip (first);
@@ -394,7 +394,7 @@ thread_func (void *arg)
timer->overrun_count = 0;
timespec_add (&timer->expirytime, &timer->expirytime,
&timer->value.it_interval);
- while (timespec_compare (&timer->expirytime, &now) < 0)
+ while (__timespec_compare (&timer->expirytime, &now) < 0)
{
timespec_add (&timer->expirytime, &timer->expirytime,
&timer->value.it_interval);
@@ -447,7 +447,7 @@ __timer_thread_queue_timer (struct thread_node *thread,
{
struct timer_node *timer = timer_links2ptr (iter);
- if (timespec_compare (&insert->expirytime, &timer->expirytime) < 0)
+ if (__timespec_compare (&insert->expirytime, &timer->expirytime) < 0)
break;
athead = 0;
}