# HG changeset patch # User Christopher Rogers # Date 1338978084 0 # Node ID 7684d44cb333b815d983b79814368c920b78d0d8 # Parent 9fb2b5586121c20f6006aefb4867e4321f581db5 cyrus-sasl: Add support for db 5.x. diff -r 9fb2b5586121 -r 7684d44cb333 cyrus-sasl/receipt --- a/cyrus-sasl/receipt Wed Jun 06 10:19:55 2012 +0000 +++ b/cyrus-sasl/receipt Wed Jun 06 10:21:24 2012 +0000 @@ -16,6 +16,7 @@ compile_rules() { cd $src + patch -Np1 -i $stuff/0027_db5_support.patch ./configure \ --with-ldap=/usr \ --with-openssl=/usr \ diff -r 9fb2b5586121 -r 7684d44cb333 cyrus-sasl/stuff/0027_db5_support.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cyrus-sasl/stuff/0027_db5_support.patch Wed Jun 06 10:21:24 2012 +0000 @@ -0,0 +1,24 @@ +Author: Ondřej Surý +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);