2.3.21.1 build failure on MacOS X 14.6.1
Hi - I get a build failure from dbox-storage.c because the stat struct doesn't have st_atim/st_ctim This simple patch fixes it (and should also work on linux/glibc hosts, but I haven't tested it there). --- src/lib-storage/index/dbox-common/dbox-storage.c.orig 2024-08-14 14:59:57 +++ src/lib-storage/index/dbox-common/dbox-storage.c 2024-08-14 15:01:23 @@ -293,8 +293,8 @@ 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 = stats.st_atime; + change_time = stats.st_ctime; } else { if (errno != ENOENT) e_error(user->event, "stat(%s) failed: %m", path); -- Daniel J. Luke
On 15/08/2024 08:33 EEST Daniel J. Luke via dovecot
wrote: Hi - I get a build failure from dbox-storage.c because the stat struct doesn't have st_atim/st_ctim
This simple patch fixes it (and should also work on linux/glibc hosts, but I haven't tested it there).
--- src/lib-storage/index/dbox-common/dbox-storage.c.orig 2024-08-14 14:59:57 +++ src/lib-storage/index/dbox-common/dbox-storage.c 2024-08-14 15:01:23 @@ -293,8 +293,8 @@ 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 = stats.st_atime; + change_time = stats.st_ctime; } else { if (errno != ENOENT) e_error(user->event, "stat(%s) failed: %m", path);
-- Daniel J. Luke
Hi! This has already been fixed in main with https://github.com/dovecot/core/pull/211 Aki
participants (2)
-
Aki Tuomi
-
Daniel J. Luke