diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 18a68f80db7..bcd37869067 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -1478,10 +1478,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 */