Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dovecot2: apply upstream PR to fix macOS build.
- Loading branch information
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
mail/dovecot2/patches/patch-src_lib-storage_index_dbox-common_dbox-storage.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
$NetBSD: patch-src_lib-storage_index_dbox-common_dbox-storage.c,v 1.1 2023/09/24 18:03:09 schmonz Exp $ | ||
|
||
Apply upstream PR #211 to fix macOS build. | ||
|
||
--- src/lib-storage/index/dbox-common/dbox-storage.c.orig 2023-09-14 13:17:46.000000000 +0000 | ||
+++ src/lib-storage/index/dbox-common/dbox-storage.c | ||
@@ -293,8 +293,8 @@ int dbox_mailbox_list_cleanup(struct mai | ||
if the directory exists. In case, get also the ctime */ | ||
struct stat stats; | ||
if (stat(path, &stats) == 0) { | ||
- last_temp_file_scan = stats.st_atim.tv_sec; | ||
- change_time = stats.st_ctim.tv_sec; | ||
+ last_temp_file_scan = ST_ATIME_SEC(stats); | ||
+ change_time = ST_CTIME_SEC(stats); | ||
} else { | ||
if (errno != ENOENT) | ||
e_error(user->event, "stat(%s) failed: %m", path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
$NetBSD: patch-src_lib_compat.h,v 1.1 2023/09/24 18:03:09 schmonz Exp $ | ||
|
||
Apply upstream PR #211 to fix macOS build. | ||
|
||
--- src/lib/compat.h.orig 2023-09-14 13:17:46.000000000 +0000 | ||
+++ src/lib/compat.h | ||
@@ -110,15 +110,24 @@ typedef int socklen_t; | ||
# define ST_ATIME_NSEC(st) ((unsigned long)(st).st_atim.tv_nsec) | ||
# define ST_MTIME_NSEC(st) ((unsigned long)(st).st_mtim.tv_nsec) | ||
# define ST_CTIME_NSEC(st) ((unsigned long)(st).st_ctim.tv_nsec) | ||
+# define ST_ATIME_SEC(st) ((unsigned long)(st).st_atim.tv_sec) | ||
+# define ST_MTIME_SEC(st) ((unsigned long)(st).st_mtim.tv_sec) | ||
+# define ST_CTIME_SEC(st) ((unsigned long)(st).st_ctim.tv_sec) | ||
#elif defined (HAVE_STAT_XTIMESPEC) | ||
# define HAVE_ST_NSECS | ||
# define ST_ATIME_NSEC(st) ((unsigned long)(st).st_atimespec.tv_nsec) | ||
# define ST_MTIME_NSEC(st) ((unsigned long)(st).st_mtimespec.tv_nsec) | ||
# define ST_CTIME_NSEC(st) ((unsigned long)(st).st_ctimespec.tv_nsec) | ||
+# define ST_ATIME_SEC(st) ((unsigned long)(st).st_atimespec.tv_sec) | ||
+# define ST_MTIME_SEC(st) ((unsigned long)(st).st_mtimespec.tv_sec) | ||
+# define ST_CTIME_SEC(st) ((unsigned long)(st).st_ctimespec.tv_sec) | ||
#else | ||
# define ST_ATIME_NSEC(st) 0UL | ||
# define ST_MTIME_NSEC(st) 0UL | ||
# define ST_CTIME_NSEC(st) 0UL | ||
+# define ST_ATIME_SEC(st) 0UL | ||
+# define ST_MTIME_SEC(st) 0UL | ||
+# define ST_CTIME_SEC(st) 0UL | ||
#endif | ||
|
||
#ifdef HAVE_ST_NSECS |