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:
parent
c062fa2fa9
commit
1d2b481069
1 changed files with 6 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue