diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 6bb2a47485..b7f99fc18d 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -1462,10 +1462,12 @@ DetermineSleepTime(struct timeval * timeout) if (next_wakeup != 0) { + long secs; int microsecs; TimestampDifference(GetCurrentTimestamp(), next_wakeup, - &timeout->tv_sec, µsecs); + &secs, µsecs); + timeout->tv_sec = secs; timeout->tv_usec = microsecs; /* Ensure we don't exceed one minute */