[Ilugc] Patch to allow postfix-1.1.12 to build cleanly with db4

  • From: siva@xxxxxxxxxxx (Sivasankar Chander)
  • Date: Mon Aug 30 12:04:02 2004

Hi folks,
         I'm including a small patch to allow building postfix-1.1.12
(the last postfix1 release) to build cleanly on distros with Berkeley
db4, including RH8, 9, FC1, FC2, etc. If anybody out there still uses
Postfix1, give it a whirl. I'm using it in conjuction with Cyrus-SASL
1.5.28. It will probably also work on other postfix-1.1.x releases,
maybe with a line number offset - YMMV. I used it to patch postfix-
1.1.12-5.src.rpm (Google for this one).

##################### Begin postfix-dict_db.patch ####################
--- postfix-1.1.12/src/util/dict_db.c   Sun Aug 29 19:56:04 2004
+++ postfix-1.1.12-patched/src/util/dict_db.c   Sun Aug 29 19:57:21 2004
@@ -520,7 +520,7 @@
        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 ((errno = db->open(db, db_path, 0, type, db_flags, 0644)) != 0)
+    if ((errno = db->open(db, NULL, db_path, 0, type, db_flags, 0644)) != 0) 
        msg_fatal("open database %s: %m", db_path);
     if ((errno = db->fd(db, &dbfd)) != 0)
        msg_fatal("get database file descriptor: %m");
###################### End postfix-dict_db.patch #####################

The main benefit of using Postfix1 is that there's a greater body of
knowledge of its quirks and oddities, so those who already have it
running well would prefer to continue using it. This patch allows that,
even on more recent distros.

-Siva

Other related posts:

  • » [Ilugc] Patch to allow postfix-1.1.12 to build cleanly with db4 - Sivasankar Chander