summaryrefslogtreecommitdiff
path: root/testing/cyrus-sasl/0027_db5_support.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-01-10 23:15:00 +0000
committerroot <root@rshg054.dnsready.net>2012-01-10 23:15:00 +0000
commitb8012183bbaae70ce4a714c618a967e85df9f521 (patch)
tree1df6f612c4f75faa9f54467e0a856bcdde0b6a1a /testing/cyrus-sasl/0027_db5_support.patch
parentfdcaf644692e151ddc596b148465ce4a77e6b670 (diff)
Tue Jan 10 23:14:59 UTC 2012
Diffstat (limited to 'testing/cyrus-sasl/0027_db5_support.patch')
-rw-r--r--testing/cyrus-sasl/0027_db5_support.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/cyrus-sasl/0027_db5_support.patch b/testing/cyrus-sasl/0027_db5_support.patch
new file mode 100644
index 000000000..522824074
--- /dev/null
+++ b/testing/cyrus-sasl/0027_db5_support.patch
@@ -0,0 +1,24 @@
+Author: Ondřej Surý <ondrej@debian.org>
+Description: Support newer Berkeley DB versions
+--- a/sasldb/db_berkeley.c
++++ b/sasldb/db_berkeley.c
+@@ -101,7 +101,7 @@ static int berkeleydb_open(const sasl_ut
+ ret = db_create(mbdb, NULL, 0);
+ if (ret == 0 && *mbdb != NULL)
+ {
+-#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
++#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1))
+ ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, flags, 0660);
+ #else
+ ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags, 0660);
+--- a/utils/dbconverter-2.c
++++ b/utils/dbconverter-2.c
+@@ -214,7 +214,7 @@ static int berkeleydb_open(const char *p
+ ret = db_create(mbdb, NULL, 0);
+ if (ret == 0 && *mbdb != NULL)
+ {
+-#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
++#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1))
+ ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, DB_CREATE, 0664);
+ #else
+ ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, DB_CREATE, 0664);