openbsd-ports/mail/dovecot/patches/patch-src_lib-index_mail-index-data_c
jolan a07ffc1aaa incorporate megadiff from the author which allows mmaping of index data
on openbsd, related to pr/3291.  bump PKGNAME
2003-07-23 06:03:00 +00:00

17 lines
659 B
Plaintext

$OpenBSD: patch-src_lib-index_mail-index-data_c,v 1.1 2003/07/23 06:03:01 jolan Exp $
--- src/lib-index/mail-index-data.c.orig Thu May 29 16:55:58 2003
+++ src/lib-index/mail-index-data.c Tue Jul 15 15:17:26 2003
@@ -133,6 +133,12 @@ static int mmap_update(struct mail_index
{
struct mail_index_data_header *hdr;
+ if (data->index->mmap_invalidate && data->mmap_base != NULL) {
+ if (msync(data->mmap_base, data->mmap_used_length,
+ MS_SYNC | MS_INVALIDATE) < 0)
+ return index_data_set_syscall_error(data, "msync()");
+ }
+
if (data->header != NULL &&
data->header->indexid != data->index->indexid) {
if (data->header->indexid != 0) {