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:
Miroslav Lichvar 2015-09-18 10:16:40 +02:00
parent c062fa2fa9
commit 1d2b481069

View file

@ -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) {