summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/courier-imap/Makefile1
-rw-r--r--mail/courier-imap/files/patch-libs_maildir_maildircreate.c19
2 files changed, 20 insertions, 0 deletions
diff --git a/mail/courier-imap/Makefile b/mail/courier-imap/Makefile
index 009f9649ab76..5c4471ce99b5 100644
--- a/mail/courier-imap/Makefile
+++ b/mail/courier-imap/Makefile
@@ -1,5 +1,6 @@
PORTNAME= courier-imap
PORTVERSION= 5.2.10
+PORTREVISION= 1
PORTEPOCH= 2
CATEGORIES= mail
MASTER_SITES= SF/courier/imap/${PORTVERSION}
diff --git a/mail/courier-imap/files/patch-libs_maildir_maildircreate.c b/mail/courier-imap/files/patch-libs_maildir_maildircreate.c
new file mode 100644
index 000000000000..6394848d0ba1
--- /dev/null
+++ b/mail/courier-imap/files/patch-libs_maildir_maildircreate.c
@@ -0,0 +1,19 @@
+--- libs/maildir/maildircreate.c.orig 2022-05-23 09:00:05 UTC
++++ libs/maildir/maildircreate.c
+@@ -146,6 +146,7 @@ static int maildir_tmpcreate_fd_do(struct maildir_tmpc
+ strcat(info->tmpname, hostname);
+ strcat(info->tmpname, len_buf);
+
++ errno = 0;
+ if (stat( info->tmpname, &stat_buf) == 0)
+ {
+ maildir_tmpcreate_free(info);
+@@ -153,7 +154,7 @@ static int maildir_tmpcreate_fd_do(struct maildir_tmpc
+ return -1;
+ }
+
+- if (errno != ENOENT)
++ if (errno != 0 && errno != ENOENT)
+ {
+ maildir_tmpcreate_free(info);
+ if (errno == EAGAIN)