[chrony-dev] PPS on FreeBSD |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-dev] PPS on FreeBSD
- From: Jail Bird <jailbird@xxxxxxx>
- Date: Thu, 2 Aug 2018 23:21:58 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fdf-net.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:from:date:message-id:subject:to; bh=oRB5868kR69NJJbiHHyMXaMphv66Fh5nzgYGdal9fpU=; b=rUfFtqjUvAUxOV5wjPHLOAb2G5iNzkUsQ23k1OceHcMaiBzFmGKc9/tuyoUPYS+Dai v1FM8Z5HUJ/J2JXrkafiYsQgp0o06D0x3zhREnROkA1SJEaNl6Qb+DQr9SOxJ3BY1Cxt uFZObdE1MXm0WGGzhIG569zbUiOuFy4MUqRXl7b7mwViPPHwbB4YZMWaBjjjmKVyklD6 wvEfm7n0NiOSstEyFfS+fxBWwK9Ay5rG9sHBqabSuEayymGWkw0Na+wWwb4AeH5/r3Up gcrpgbyvATSn+v+JT3J0nxrjAaSx+bGEXdjOEnjuGqqsvhBcnnzjTPF8s4zjIy0NzVwK ufmQ==
While chrony + PPS works great on FreeBSD, it doesn't currently get
enabled because sys/timepps.h on FreeBSD uses C99 integer types, and
the configure script doesn't enable those for the checks.
I'm not sure if this is the correct fix, but this crude hack makes it work:
--- configure 2018-04-04 02:18:44.000000000 -0500
+++ configure 2018-08-02 22:22:16.114103000 -0500
@@ -593,16 +593,19 @@ else
echo "error: could not compile/link a program which uses sqrt(),
log(), pow()"
exit 1
fi
fi
+int_types=""
if test_code '<stdint.h>' 'stdint.h' '' '' ''; then
add_def HAVE_STDINT_H
+ int_types="$int_types stdint.h"
fi
if test_code '<inttypes.h>' 'inttypes.h' '' '' ''; then
add_def HAVE_INTTYPES_H
+ int_types="$int_types inttypes.h"
fi
if test_code 'struct in_pktinfo' 'sys/socket.h netinet/in.h' '' '' '
struct in_pktinfo ipi;
return sizeof (ipi.ipi_spec_dst.s_addr) + IP_PKTINFO;'
@@ -713,11 +716,11 @@ then
fi
fi
timepps_h=""
if [ $feat_refclock = "1" ] && [ $feat_pps = "1" ]; then
- if test_code '<sys/timepps.h>' 'sys/timepps.h' '' '' ''; then
+ if test_code '<sys/timepps.h>' "$int_types sys/timepps.h" '' '' ''; then
timepps_h="sys/timepps.h"
add_def HAVE_SYS_TIMEPPS_H
else
if test_code '<timepps.h>' 'timepps.h' '' '' ''; then
timepps_h="timepps.h"
@@ -725,11 +728,11 @@ if [ $feat_refclock = "1" ] && [ $feat_pps = "1" ]; th
fi
fi
fi
if [ "x$timepps_h" != "x" ] && \
- test_code 'PPSAPI' "string.h $timepps_h" '' '' '
+ test_code 'PPSAPI' "string.h $int_types $timepps_h" '' '' '
pps_handle_t h = 0;
pps_info_t i;
struct timespec ts;
return time_pps_fetch(h, PPS_TSFMT_TSPEC, &i, &ts);'
then
-JailBird
--
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.