mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 07:45:07 -05:00
Don't use timezone parameter in gettimeofday and settimeofday calls
This commit is contained in:
14
sys_sunos.c
14
sys_sunos.c
@@ -84,13 +84,12 @@ static void
|
||||
clock_initialise(void)
|
||||
{
|
||||
struct timeval newadj, oldadj;
|
||||
struct timezone tz;
|
||||
|
||||
offset_register = 0.0;
|
||||
adjustment_requested = 0.0;
|
||||
current_freq = 0.0;
|
||||
|
||||
if (gettimeofday(&T0, &tz) < 0) {
|
||||
if (gettimeofday(&T0, NULL) < 0) {
|
||||
LOG_FATAL(LOGF_SysSunOS, "gettimeofday() failed");
|
||||
}
|
||||
|
||||
@@ -126,7 +125,6 @@ start_adjust(void)
|
||||
{
|
||||
struct timeval newadj, oldadj;
|
||||
struct timeval T1;
|
||||
struct timezone tz;
|
||||
double elapsed, accrued_error;
|
||||
double adjust_required;
|
||||
struct timeval exact_newadj;
|
||||
@@ -135,7 +133,7 @@ start_adjust(void)
|
||||
long remainder, multiplier;
|
||||
|
||||
/* Determine the amount of error built up since the last adjustment */
|
||||
if (gettimeofday(&T1, &tz) < 0) {
|
||||
if (gettimeofday(&T1, NULL) < 0) {
|
||||
LOG_FATAL(LOGF_SysSunOS, "gettimeofday() failed");
|
||||
}
|
||||
|
||||
@@ -185,7 +183,6 @@ static void
|
||||
stop_adjust(void)
|
||||
{
|
||||
struct timeval T1;
|
||||
struct timezone tz;
|
||||
struct timeval zeroadj, remadj;
|
||||
double adjustment_remaining, adjustment_achieved;
|
||||
double gap;
|
||||
@@ -198,7 +195,7 @@ stop_adjust(void)
|
||||
LOG_FATAL(LOGF_SysSunOS, "adjtime() failed");
|
||||
}
|
||||
|
||||
if (gettimeofday(&T1, &tz) < 0) {
|
||||
if (gettimeofday(&T1, NULL) < 0) {
|
||||
LOG_FATAL(LOGF_SysSunOS, "gettimeofday() failed");
|
||||
}
|
||||
|
||||
@@ -238,16 +235,15 @@ static void
|
||||
apply_step_offset(double offset)
|
||||
{
|
||||
struct timeval old_time, new_time, T1;
|
||||
struct timezone tz;
|
||||
|
||||
stop_adjust();
|
||||
if (gettimeofday(&old_time, &tz) < 0) {
|
||||
if (gettimeofday(&old_time, NULL) < 0) {
|
||||
LOG_FATAL(LOGF_SysSunOS, "gettimeofday() failed");
|
||||
}
|
||||
|
||||
UTI_AddDoubleToTimeval(&old_time, -offset, &new_time);
|
||||
|
||||
if (settimeofday(&new_time, &tz) < 0) {
|
||||
if (settimeofday(&new_time, NULL) < 0) {
|
||||
LOG_FATAL(LOGF_SysSunOS, "settimeofday() failed");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user