mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:25:07 -05:00
sys_timex: set timex constant on Solaris
The kernel apparently checks the constant even when it's not being set with MOD_TIMECONST and may return EINVAL on an uninitialized value.
This commit is contained in:
@@ -215,6 +215,12 @@ SYS_Timex_Adjust(struct timex *txc, int ignore_error)
|
|||||||
{
|
{
|
||||||
int state;
|
int state;
|
||||||
|
|
||||||
|
#ifdef SOLARIS
|
||||||
|
/* The kernel seems to check the constant even when it's not being set */
|
||||||
|
if (!(txc->modes & MOD_TIMECONST))
|
||||||
|
txc->constant = 10;
|
||||||
|
#endif
|
||||||
|
|
||||||
state = NTP_ADJTIME(txc);
|
state = NTP_ADJTIME(txc);
|
||||||
|
|
||||||
if (state < 0) {
|
if (state < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user