Re: [chrony-dev] [PATCH] Add option --without-clock-gettime to disable clock_gettime even if present |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
On Tue, Aug 23, 2016 at 01:03:24AM +1200, Bryan Christianson wrote:
> -if test_code 'clock_gettime()' 'time.h' '' '' \
> - 'clock_gettime(CLOCK_REALTIME, NULL);'
> -then
> - add_def HAVE_CLOCK_GETTIME
> -else
> - if test_code 'clock_gettime() in -lrt' 'time.h' '' '-lrt' \
> +if [ $try_clock_gettime = "1" ]; then
> + if test_code 'clock_gettime()' 'time.h' '' '' \
> 'clock_gettime(CLOCK_REALTIME, NULL);'
> then
> add_def HAVE_CLOCK_GETTIME
> - EXTRA_LIBS="$EXTRA_LIBS -lrt"
> else
> - try_phc=0
> + if test_code 'clock_gettime() in -lrt' 'time.h' '' '-lrt' \
> + 'clock_gettime(CLOCK_REALTIME, NULL);'
> + then
> + add_def HAVE_CLOCK_GETTIME
> + EXTRA_LIBS="$EXTRA_LIBS -lrt"
> + else
> + try_phc=0
> + fi
> fi
> fi
The try_phc variable should be set to 0 when not using clock_gettime()
as the PHC refclock depends on it. I'll fix that and push. Thanks!
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.