]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
squidguard: Fix build with db6
authorErik Kapfer <erik.kapfer@ipfire.org>
Tue, 7 Jul 2015 21:35:39 +0000 (23:35 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 14 Jul 2015 15:18:01 +0000 (17:18 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/squidguard
src/patches/squidguard-1.4.1-db6.patch [new file with mode: 0644]

index a48c25cbe2d275dfd79878a15b10b06a538431e7..ae872a17cd961064e9f039d3dc7521f564d5c76c 100644 (file)
@@ -71,6 +71,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
        cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/squidguard-1.4-squid-helper-protocol.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/squidguard-1.4.1-db6.patch
        cd $(DIR_APP) && ./configure --prefix=/usr --datadir=/usr/share \
                --sysconfdir=/etc --localstatedir=/var --infodir=/usr/info --mandir=/usr/man  \
                --with-sg-config=/var/ipfire/urlfilter/squidGuard.conf \
diff --git a/src/patches/squidguard-1.4.1-db6.patch b/src/patches/squidguard-1.4.1-db6.patch
new file mode 100644 (file)
index 0000000..214f89c
--- /dev/null
@@ -0,0 +1,15 @@
+Patch from Mon Jan 21 2013 Bojan Smojver <bojan@rexursive.com> - 1.4-16
+https://bugzilla.redhat.com/attachment.cgi?id=684010
+Fix for Berkeley DB 6
+
+--- squidGuard-1.4.1.orig/src/sgDb.c   2008-07-14 20:29:41.000000000 +0200
++++ squidGuard-1.4.1/src/sgDb.c        2015-06-25 09:44:24.009793986 +0200
+@@ -114,7 +114,7 @@
+     }
+   }
+ #endif
+-#if DB_VERSION_MAJOR == 4
++#if DB_VERSION_MAJOR >= 4
+   if(globalUpdate || createdb || (dbfile != NULL && stat(dbfile,&st))){
+     flag = DB_CREATE;
+     if(createdb)