Old wrong DB version test in lib/roken/ndbm_wrap.c
Honza Macháček <[email protected]> Wed, 30 Aug 2017 15:34:32 +0200
| Newsgroups | gmane.comp.encryption.kerberos.heimdal.general |
|---|---|
| Message-ID | <[email protected]> |
Dear all, having sent a minor bug report to an apparently wrong address, I am sending it here. Compiling Heimdal 7.4.0 under Gentoo, likely against Berkeley DB 6.0, I have found that in lib/roken/ndbm_wrap.c an old wrong test for DB version still remains (while its counterpart in lib/hdb/db3.c has been corrected). I am attaching the patch I have applied to compile Heimdal with success. With best regards Honza Macháček
heimdal7-db6.patch
(text/x-patch, 379 B)
--- a/lib/roken/ndbm_wrap.c
+++ b/lib/roken/ndbm_wrap.c
@@ -175,7 +175,7 @@
return NULL;
}
-#if (DB_VERSION_MAJOR > 3) && (DB_VERSION_MINOR > 0)
+#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR > 0))
if(db->open(db, NULL, fn, NULL, DB_BTREE, myflags, mode) != 0) {
#else
if(db->open(db, fn, NULL, DB_BTREE, myflags, mode) != 0) {