|
|
|
|
diff -Naur postfix-1.1.11.orig/src/util/dict_db.c postfix-1.1.11/src/util/dict_db.c
|
|
|
|
|
--- postfix-1.1.11.orig/src/util/dict_db.c Mon Oct 14 18:54:26 2002
|
|
|
|
|
+++ postfix-1.1.11/src/util/dict_db.c Mon Oct 14 19:52:16 2002
|
|
|
|
|
@@ -520,8 +520,13 @@
|
|
|
|
|
msg_fatal("set DB cache size %d: %m", DICT_DB_CACHE_SIZE);
|
|
|
|
|
if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0)
|
|
|
|
|
msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM);
|
|
|
|
|
+#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
|
|
|
|
|
+ if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0)
|
|
|
|
|
+ msg_fatal("open database %s: %m", db_path);
|
|
|
|
|
+#else
|
|
|
|
|
if ((errno = db->open(db, db_path, 0, type, db_flags, 0644)) != 0)
|
|
|
|
|
msg_fatal("open database %s: %m", db_path);
|
|
|
|
|
+#endif
|
|
|
|
|
if ((errno = db->fd(db, &dbfd)) != 0)
|
|
|
|
|
msg_fatal("get database file descriptor: %m");
|
|
|
|
|
#endif
|