postfix-2.8-20100323, FreeBSD ports: mail/postfix-current, databases/db50 /etc/make.conf: WITH_BDB_VER=50
--- src/util/dict_db.c~ 2010-01-02 22:28:08.000000000 +0100 +++ src/util/dict_db.c 2010-06-11 15:50:48.000000000 +0200 @@ -676,5 +676,5 @@ 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 > 0) +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0 || DB_VERSION_MAJOR == 5) if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0) msg_fatal("open database %s: %m", db_path); Seems to work fine. There wasn't any API change in db->open between 4.8 and 5.0 as far as I can tell. Mark