[LTP] [PATCH v3] clock_settime: use POSIX runtime detection for CLOCK_MONOTONIC
Andrea Cervesato
andrea.cervesato@suse.com
Mon May 4 11:26:31 CEST 2026
Hi Cyril,
> > +#ifdef _POSIX_MONOTONIC_CLOCK
>
> I suppose that this not correct either. If _POSIX_MONOTONIC_CLOCK is set
> to -1 the CLOCK_MONOTONIC constant may not be defined.
>
> So we either have to to do
>
> #if _POSIX_MONOTONIC_CLOCK >= 0
>
> or
>
> #ifdef CLOCK_MONOTONIC
>
You are right, that's indeed a valid value. I double checked the
definition and some systems might set it to -1.
I will send a fix for it with the new version.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
More information about the ltp
mailing list