Wietse Venema:
> > Based on src/util/dict_db.c, the latest supported Berkeley DB major
> > version is 5.
>
> There is no db6 port on my FreeBSD9 laptop, so I'll try to install
> one from the future.
It appears that the API has not changed.
To build, use:
$ make makefiles CCAGRS="-I/usr/local/include/db6" \
AUXLIBS="-L/usr/local/lib -ldb-6.0"
Wietse
diff --exclude=man --exclude=html --exclude=README_FILES --exclude=.indent.pro
--exclude=Makefile.in -ur /var/tmp/postfix-2.12-20140508/src/util/dict_db.c
src/util/dict_db.c
--- /var/tmp/postfix-2.12-20140508/src/util/dict_db.c 2012-01-25
01:41:08.000000000 +0100
+++ src/util/dict_db.c 2014-05-12 18:22:49.000000000 +0200
@@ -89,7 +89,7 @@
#define DONT_CLOBBER DB_NOOVERWRITE
#endif
-#if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR < 6)
+#if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR <= 6)
#define DICT_DB_CURSOR(db, curs) (db)->cursor((db), NULL, (curs))
#else
#define DICT_DB_CURSOR(db, curs) (db)->cursor((db), NULL, (curs), 0)
@@ -693,7 +693,8 @@
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 == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0)
+#if DB_VERSION_MAJOR == 6 || DB_VERSION_MAJOR == 5 || \
+ (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0)
if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0)
FREE_RETURN(dict_surrogate(class, path, open_flags, dict_flags,
"open database %s: %m", db_path));