You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
1.1 KiB

diff -Naur cyrus-imapd-2.1.9.orig/lib/cyrusdb_db3.c cyrus-imapd-2.1.9/lib/cyrusdb_db3.c
--- cyrus-imapd-2.1.9.orig/lib/cyrusdb_db3.c Tue Aug 6 18:55:03 2002
+++ cyrus-imapd-2.1.9/lib/cyrusdb_db3.c Wed Oct 16 18:11:24 2002
@@ -228,10 +228,15 @@
static int mysync(void)
{
+#if (DB_VERSION_MAJOR <= 4 && DB_VERSION_MINOR < 1)
int r;
+#endif
assert(dbinit);
+#if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1)
+ txn_checkpoint(dbenv, 0, 0, 0);
+#else
do {
#if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR == 3) && (DB_VERSION_MINOR > 0))
r = txn_checkpoint(dbenv, 0, 0, 0);
@@ -244,6 +249,7 @@
db_strerror(r));
return CYRUSDB_IOERROR;
}
+#endif
return 0;
}
@@ -347,7 +353,11 @@
}
/* xxx set comparator! */
+#if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1)
+ r = db->open(db, NULL, fname, NULL, DB_BTREE, DB_CREATE, 0664);
+#else
r = db->open(db, fname, NULL, DB_BTREE, DB_CREATE, 0664);
+#endif
if (r != 0) {
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname, db_strerror(r));
return CYRUSDB_IOERROR;