aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2007-08-06 22:44:11 +0800
committerume <ume@FreeBSD.org>2007-08-06 22:44:11 +0800
commit759e15369e62dec4913ece3929aa2eebae255eb2 (patch)
treedc2c60a2ff1c6c9824ee72110bd03d83f8c9cd85 /mail
parent6538a1ccf0088da6bac7acb2345b8d8e019bb994 (diff)
downloadfreebsd-ports-graphics-759e15369e62dec4913ece3929aa2eebae255eb2.tar.gz
freebsd-ports-graphics-759e15369e62dec4913ece3929aa2eebae255eb2.tar.zst
freebsd-ports-graphics-759e15369e62dec4913ece3929aa2eebae255eb2.zip
compatibility fix for DBENV->set_lk_max()
Obtained from: https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/lib/cyrusdb_berkeley.c.diff?r1=1.17;r2=1.18
Diffstat (limited to 'mail')
-rw-r--r--mail/cyrus-imapd23/files/patch-lib::cyrusdb_berkeley.c20
-rw-r--r--mail/cyrus-imapd24/files/patch-lib::cyrusdb_berkeley.c20
2 files changed, 40 insertions, 0 deletions
diff --git a/mail/cyrus-imapd23/files/patch-lib::cyrusdb_berkeley.c b/mail/cyrus-imapd23/files/patch-lib::cyrusdb_berkeley.c
new file mode 100644
index 00000000000..722b7bde206
--- /dev/null
+++ b/mail/cyrus-imapd23/files/patch-lib::cyrusdb_berkeley.c
@@ -0,0 +1,20 @@
+Index: lib/cyrusdb_berkeley.c
+diff -u -p lib/cyrusdb_berkeley.c.orig lib/cyrusdb_berkeley.c
+--- lib/cyrusdb_berkeley.c.orig 2007-02-06 03:43:26.000000000 +0900
++++ lib/cyrusdb_berkeley.c 2007-08-06 23:04:15.000000000 +0900
+@@ -176,7 +176,15 @@ static int init(const char *dbdir, int m
+ syslog(LOG_WARNING,
+ "DBERROR: invalid berkeley_locks_max value, using internal default");
+ } else {
++#if DB_VERSION_MAJOR >= 4
++ r = dbenv->set_lk_max_locks(dbenv, opt);
++ if (!r)
++ r = dbenv->set_lk_max_lockers(dbenv, opt);
++ if (!r)
++ r = dbenv->set_lk_max_objects(dbenv, opt);
++#else
+ r = dbenv->set_lk_max(dbenv, opt);
++#endif
+ if (r) {
+ dbenv->err(dbenv, r, "set_lk_max");
+ syslog(LOG_ERR, "DBERROR: set_lk_max(): %s", db_strerror(r));
diff --git a/mail/cyrus-imapd24/files/patch-lib::cyrusdb_berkeley.c b/mail/cyrus-imapd24/files/patch-lib::cyrusdb_berkeley.c
new file mode 100644
index 00000000000..722b7bde206
--- /dev/null
+++ b/mail/cyrus-imapd24/files/patch-lib::cyrusdb_berkeley.c
@@ -0,0 +1,20 @@
+Index: lib/cyrusdb_berkeley.c
+diff -u -p lib/cyrusdb_berkeley.c.orig lib/cyrusdb_berkeley.c
+--- lib/cyrusdb_berkeley.c.orig 2007-02-06 03:43:26.000000000 +0900
++++ lib/cyrusdb_berkeley.c 2007-08-06 23:04:15.000000000 +0900
+@@ -176,7 +176,15 @@ static int init(const char *dbdir, int m
+ syslog(LOG_WARNING,
+ "DBERROR: invalid berkeley_locks_max value, using internal default");
+ } else {
++#if DB_VERSION_MAJOR >= 4
++ r = dbenv->set_lk_max_locks(dbenv, opt);
++ if (!r)
++ r = dbenv->set_lk_max_lockers(dbenv, opt);
++ if (!r)
++ r = dbenv->set_lk_max_objects(dbenv, opt);
++#else
+ r = dbenv->set_lk_max(dbenv, opt);
++#endif
+ if (r) {
+ dbenv->err(dbenv, r, "set_lk_max");
+ syslog(LOG_ERR, "DBERROR: set_lk_max(): %s", db_strerror(r));