patch for working with DB4 on heimdal-discuss

From: Luke Howard <lukeh@PADL.COM>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12697 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-08-29 16:37:25 +00:00
parent 602247aaac
commit 32276ee7b7
2 changed files with 13 additions and 1 deletions

View File

@@ -165,7 +165,12 @@ dbm_open (const char *file, int flags, mode_t mode)
free(fn);
return NULL;
}
#if (DB_VERSION_MAJOR > 3) && (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) {
#endif
free(fn);
db->close(db, 0);
return NULL;