On Thu, May 28, 2020 at 7:29 AM Florian Weimer wrote: > > * H. J. Lu: > > > On Thu, May 28, 2020 at 5:58 AM Florian Weimer wrote: > >> > >> * H. J. Lu via Libc-alpha: > >> > >> > diff --git a/sysdeps/generic/hp-timing.h b/sysdeps/generic/hp-timing.h > >> > index af9d92f7f7..99b12995f1 100644 > >> > --- a/sysdeps/generic/hp-timing.h > >> > +++ b/sysdeps/generic/hp-timing.h > >> > @@ -24,6 +24,11 @@ > >> > #include > >> > #include > >> > > >> > +#ifdef _ISOMAC > >> > +# define __timespec64 timespec > >> > +# define __clock_gettime64 clock_gettime > >> > +#endif > >> > + > >> > /* It should not be used for ld.so. */ > >> > #define HP_TIMING_INLINE (0) > >> > >> To be honest, I would have expected different definitions of the timing > >> macros. This redirection looks a bit iffy for me for _ISOMAC. > > > > What do you have in mind? > > Something like this: > > /* The clock_gettime (CLOCK_MONOTONIC) has unspecified starting time, > nano-second accuracy, and for some architectues is implemented as > vDSO symbol. */ > #ifdef _ISOMAC > # define HP_TIMING_NOW(var) \ > ({ \ > struct timespec tv; \ > clock_gettime (CLOCK_MONOTONIC, &tv); \ > (var) = (tv.tv_nsec + UINT64_C(1000000000) * tv.tv_sec); \ > }) > #else > # define HP_TIMING_NOW(var) \ > ({ \ > struct __timespec64 tv; \ > __clock_gettime64 (CLOCK_MONOTONIC, &tv); \ > (var) = (tv.tv_nsec + UINT64_C(1000000000) * tv.tv_sec); \ > }) > #endif > > in sysdeps/generic/hp-timing.h. > Here is the updated patch. OK for master? Thanks. -- H.J.