]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib: Fix timeval_cmp_margin for 32-bit systems
authorPaul Howarth <paul@city-fan.org>
Mon, 4 Jan 2021 16:31:03 +0000 (16:31 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 3 Feb 2021 10:21:45 +0000 (10:21 +0000)
commit2cc1feca9087651902a5ea3cda021c8a0b3217ce
treed8d3522b71de4e93f14d9f2a9a93e8384106ad96
parent195f6742c3736c25d8d78502bc76c6d1a805bf96
lib: Fix timeval_cmp_margin for 32-bit systems

The test suite compares times with seconds values of -INT_MAX and
INT_MAX. The result of this comparison does not fit in a value of
type int and so the test suite fails on 32-bit systems where time_t
is an int. To fix this, calculations on seconds values are done
using long long integers.

Broken by 16ab5542
src/lib/time-util.c