forked from pool/cyrus-sasl
3c9308fa83
- Add cyrus-sasl-db6.diff to fix compile abort with db >= 5 OBS-URL: https://build.opensuse.org/request/show/178927 OBS-URL: https://build.opensuse.org/package/show/network/cyrus-sasl?expand=0&rev=34
40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
From: Jan Engelhardt <jengelh@inai.de>
|
|
Date: 2013-06-14 02:40:23.947245857 +0200
|
|
X-Upstream: This patch becomes obsolete with cyrus-sasl-2.1.26
|
|
|
|
src: fix sloppy DB version >= 4.1 check
|
|
|
|
Look! db-6.0 has hit the scene.
|
|
|
|
---
|
|
sasldb/db_berkeley.c | 2 +-
|
|
utils/dbconverter-2.c | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
Index: cyrus-sasl-2.1.25/sasldb/db_berkeley.c
|
|
===================================================================
|
|
--- cyrus-sasl-2.1.25.orig/sasldb/db_berkeley.c
|
|
+++ cyrus-sasl-2.1.25/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);
|
|
Index: cyrus-sasl-2.1.25/utils/dbconverter-2.c
|
|
===================================================================
|
|
--- cyrus-sasl-2.1.25.orig/utils/dbconverter-2.c
|
|
+++ cyrus-sasl-2.1.25/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);
|