diff options
author | jmc <jmc@pkgsrc.org> | 2003-06-16 16:54:03 +0000 |
---|---|---|
committer | jmc <jmc@pkgsrc.org> | 2003-06-16 16:54:03 +0000 |
commit | 91387f952fac12c21a709941bc13ffc438daf388 (patch) | |
tree | cf4d4534cfa166b0b3847f6ca7c1998fc6251a0c /mail/prayer/patches | |
parent | bff8e49ca0c66c472bab746a6046d30afca08703 (diff) | |
download | pkgsrc-91387f952fac12c21a709941bc13ffc438daf388.tar.gz |
Patch so this works correctly with db4 4.1 now
Diffstat (limited to 'mail/prayer/patches')
-rw-r--r-- | mail/prayer/patches/patch-af | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mail/prayer/patches/patch-af b/mail/prayer/patches/patch-af new file mode 100644 index 00000000000..25754464d5f --- /dev/null +++ b/mail/prayer/patches/patch-af @@ -0,0 +1,36 @@ +$NetBSD: patch-af,v 1.1 2003/06/16 16:54:32 jmc Exp $ + +--- mydb_db3.c.orig Mon Jun 16 11:16:13 2003 ++++ mydb_db3.c Mon Jun 16 11:24:26 2003 +@@ -239,13 +239,18 @@ + + assert(dbinit); + ++/* DB4.1 doesn't use DB_INCOMPLETE anymore */ ++#if !((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1)) + do { ++#endif + #if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR == 3) && (DB_VERSION_MINOR > 0)) + r = txn_checkpoint(dbenv, 0, 0, 0); + #else + r = txn_checkpoint(dbenv, 0, 0); + #endif ++#if !((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1)) + } while (r == DB_INCOMPLETE); ++#endif + if (r) { + syslog(LOG_ERR, "DBERROR: couldn't checkpoint: %s", + db_strerror(r)); +@@ -354,7 +359,12 @@ + } + /* xxx set comparator! */ + ++ /* 4.1 supports transactions and changed the open() syntax */ ++#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 MYDB_IOERROR; |