git: 1de999acff01 - 2024Q3 - mail/dovecot: add patch from upstream to silence "time moved forwards"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Sep 2024 13:00:12 UTC
The branch 2024Q3 has been updated by ler:
URL: https://cgit.FreeBSD.org/ports/commit/?id=1de999acff01a9c7d916c63522c6a447f4f6e487
commit 1de999acff01a9c7d916c63522c6a447f4f6e487
Author: Larry Rosenman <ler@FreeBSD.org>
AuthorDate: 2024-09-01 18:04:00 +0000
Commit: Larry Rosenman <ler@FreeBSD.org>
CommitDate: 2024-09-02 13:00:10 +0000
mail/dovecot: add patch from upstream to silence "time moved forwards"
Patch from Timo Sirainen (via dovecot list)
PR: 280929
Reported by: trashcan@ellael.org
(cherry picked from commit eae4d9b6062a7f15a533a00c173d7b66f91ec675)
---
mail/dovecot/Makefile | 1 +
mail/dovecot/files/patch-src-lib-ioloop.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile
index 44f42b27f94f..958da8355dc7 100644
--- a/mail/dovecot/Makefile
+++ b/mail/dovecot/Makefile
@@ -10,6 +10,7 @@
PORTNAME= dovecot
DISTVERSION= 2.3.21.1
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= https://dovecot.org/releases/2.3/
diff --git a/mail/dovecot/files/patch-src-lib-ioloop.c b/mail/dovecot/files/patch-src-lib-ioloop.c
new file mode 100644
index 000000000000..e2606e515d96
--- /dev/null
+++ b/mail/dovecot/files/patch-src-lib-ioloop.c
@@ -0,0 +1,25 @@
+--- src/lib/ioloop.c.orig 2024-08-31 16:00:42.168389000 +0200
++++ src/lib/ioloop.c 2024-08-31 16:04:14.978513000 +0200
+@@ -18,6 +18,7 @@
+ Dovecot generally doesn't have very important short timeouts, so to avoid
+ logging many warnings about this, use a rather high value. */
+ #define IOLOOP_TIME_MOVED_FORWARDS_MIN_USECS (100000)
++#define IOLOOP_TIME_MOVED_FORWARDS_MIN_USECS_LARGE (1000000)
+
+ time_t ioloop_time = 0;
+ struct timeval ioloop_timeval;
+@@ -654,9 +655,13 @@
+ /* the callback may have slept, so check the time again. */
+ i_gettimeofday(&ioloop_timeval);
+ } else {
++ int max_diff = diff_usecs < IOLOOP_TIME_MOVED_FORWARDS_MIN_USECS_LARGE ?
++ IOLOOP_TIME_MOVED_FORWARDS_MIN_USECS :
++ IOLOOP_TIME_MOVED_FORWARDS_MIN_USECS_LARGE;
++
+ diff_usecs = timeval_diff_usecs(&ioloop->next_max_time,
+ &ioloop_timeval);
+- if (unlikely(-diff_usecs >= IOLOOP_TIME_MOVED_FORWARDS_MIN_USECS)) {
++ if (unlikely(-diff_usecs >= max_diff)) {
+ io_loops_timeouts_update(-diff_usecs);
+ /* time moved forwards */
+ ioloop->time_moved_callback(&ioloop->next_max_time,