]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
postfix: Fix build with db6 berkley-db-update
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Jul 2015 09:59:27 +0000 (11:59 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 14 Jul 2015 15:18:02 +0000 (17:18 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/postfix
src/patches/postfix-2.10-db6.patch [new file with mode: 0644]

index fd332537a78cae1262f1a2bb7479b383d3c3182d..3a10737806ebae9d96bc77a83cf854531b32698b 100644 (file)
@@ -102,6 +102,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/postfix-2.10-db6.patch
        cd $(DIR_APP) && make -f Makefile.init makefiles \
                DEBUG="" OPT="$(CFLAGS) -fno-strict-aliasing" CCARGS="$(CCARGS)" AUXLIBS="$(AUXLIBS)"
        cd $(DIR_APP) && make $(MAKETUNING)
diff --git a/src/patches/postfix-2.10-db6.patch b/src/patches/postfix-2.10-db6.patch
new file mode 100644 (file)
index 0000000..2fb02b5
--- /dev/null
@@ -0,0 +1,11 @@
+--- postfix-2.10.0/src/util/dict_db.c.orig     2015-07-09 09:56:06.888538301 +0000
++++ postfix-2.10.0/src/util/dict_db.c  2015-07-09 09:56:45.464802230 +0000
+@@ -693,7 +693,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 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));