> On 12/07/2017, at 9:55 PM, Miroslav Lichvar <mlich...@redhat.com> wrote: > > The initialization function could look like this: > > have_ntp_adjtime = (dlsym(RTLD_NEXT, "ntp_adjtime") != NULL); > if (have_ntp_adjtime) { > buggy_adjtime = !test_adjtime(); > if (buggy_adjtime) > SYS_Timex_Initialise(); > else > SYS_NetBSD_Initialise(); > return; > } > > test_adjtime() would check tv after calling adjtime({-1, 999999}, > NULL) and adjtime({0,0}, &tv), or something that doesn't slew the > clock too much. If that's not possible, the function could be selected > with an #ifdef BUGGY_ADJTIME and the macro would be defined until we > know it's fixed.
Thanks Miroslav. I like the test_adjtime() way. If/when Apple fix the bug its simple to remove but doesn't require users to upgrade to a new version of chrony to get the benefit of a fixed kernel. And failing that, then as you say, another #ifdef Bryan Christianson br...@whatroute.net -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.