mirror of
https://gitlab.com/chrony/chrony.git
synced 2026-03-10 16:49:38 -04:00
local: require clock_gettime()
Make clock_gettime() a hard requirement of chrony. It should be available on all reasonably recent versions of the supported systems. This enables adoption of the clockid_t type (CLOCK_* identifiers).
This commit is contained in:
9
configure
vendored
9
configure
vendored
@@ -666,18 +666,18 @@ then
|
||||
fi
|
||||
|
||||
if [ $try_clock_gettime = "1" ]; then
|
||||
if test_code 'clock_gettime()' 'time.h' '' '' '
|
||||
if ! test_code 'clock_gettime()' 'time.h' '' '' '
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);'
|
||||
then
|
||||
add_def HAVE_CLOCK_GETTIME
|
||||
else
|
||||
if test_code 'clock_gettime() in -lrt' 'time.h' '' '-lrt' '
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);'
|
||||
then
|
||||
add_def HAVE_CLOCK_GETTIME
|
||||
EXTRA_LIBS="$EXTRA_LIBS -lrt"
|
||||
else
|
||||
echo "error: clock_gettime() not found"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -829,7 +829,6 @@ then
|
||||
fi
|
||||
|
||||
if [ $feat_refclock = "1" ] && [ $feat_phc = "1" ] && [ $try_phc = "1" ] && \
|
||||
grep '#define HAVE_CLOCK_GETTIME' config.h > /dev/null && \
|
||||
test_code '<linux/ptp_clock.h>' 'sys/ioctl.h linux/ptp_clock.h' '' '' \
|
||||
'ioctl(1, PTP_CLOCK_GETCAPS + PTP_SYS_OFFSET, 0);'
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user