dovecot: fix build on aarch64-darwin

This commit is contained in:
Doro Rose 2023-11-28 10:21:33 +01:00
parent 48d578b7f4
commit ac7c745539
2 changed files with 18 additions and 0 deletions

View File

@ -66,6 +66,9 @@ stdenv.mkDerivation rec {
url = "https://salsa.debian.org/debian/dovecot/-/raw/debian/1%252.3.19.1+dfsg1-2/debian/patches/Support-openssl-3.0.patch";
hash = "sha256-PbBB1jIY3jIC8Js1NY93zkV0gISGUq7Nc67Ul5tN7sw=";
})
] ++ lib.optionals stdenv.isDarwin [
# fix timespec calls
./timespec.patch
];
configureFlags = [

View File

@ -0,0 +1,15 @@
diff --git a/src/lib-storage/index/dbox-common/dbox-storage.h b/src/lib-storage/index/dbox-common/dbox-storage.h
index 8e8aaa1..a3018a4 100644
--- a/src/lib-storage/index/dbox-common/dbox-storage.h
+++ b/src/lib-storage/index/dbox-common/dbox-storage.h
@@ -86,4 +86,10 @@ int dbox_verify_alt_storage(struct mailbox_list *list);
bool dbox_header_have_flag(struct mailbox *box, uint32_t ext_id,
unsigned int flags_offset, uint8_t flag);
+#if defined(__APPLE__) || defined(__NetBSD__)
+#define st_atim st_atimespec
+#define st_ctim st_ctimespec
+#define st_mtim st_mtimespec
+#endif
+
#endif