Re: [chrony-dev] [PATCH] macOS - support for ntp_adjtime() |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [PATCH] macOS - support for ntp_adjtime()
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Fri, 30 Jun 2017 13:37:40 +0200
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mlichvar@xxxxxxxxxx
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 970A361B83
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 970A361B83
On Fri, Jun 30, 2017 at 07:54:59PM +1200, Bryan Christianson wrote:
> macOS 10.13 will implement the ntp_adjtime() system call, allowing better
> control over the system clock than is possible with the existing adjtime()
> system call.
> chronyd will support both the older and newer calls, enabling binary code to
> run without recompilation on macOS 10.9 through macOS 10.13
This looks great.
Can you please also update documentation of the -r option and the
dumpdir, corrtimeratio, leapsecmode, rtcsync, maxdrift, and maxslewrate
directives? Where all supported systems would be listed, it now may be
better to say everything except macOS before 10.13.
> +if test_code '<sys/timex.h>' 'sys/timex.h' '' '' ''; then
> + add_def HAVE_SYS_TIMEX_H
> + if [ $try_macos_timex = "1" ]; then
> + EXTRA_OBJECTS="$EXTRA_OBJECTS sys_generic.o sys_timex.o"
> + priv_ops="$priv_ops ADJUSTTIMEX"
> + fi
> +fi
There is a missing check of $feat_droproot as priv_ops should not be
changed when dropping root is not supported. The try_macos_timex is
always 1 on macOS, so it could replaced with $OPERATINGSYSTEM =
"Darwin".
<sys/timex.h> is a hard requirement on other systems. Maybe if this
check fails there, the configure script should abort with an error
message?
Another possibility is to replace this with a new case switch inside
the Darwin) case which would simply define a macro for versions 10.13
and newer. SunOS-sun4* used to be some version specific configuration.
--
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.