ports/157340: [maintainer-update] www/squidguard: Fix build with Berkeley DB 4.0.x
Guido Falsi
mad at madpilot.net
Thu May 26 09:50:08 UTC 2011
>Number: 157340
>Category: ports
>Synopsis: [maintainer-update] www/squidguard: Fix build with Berkeley DB 4.0.x
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu May 26 09:50:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Guido Falsi
>Release: FreeBSD 8.2-STABLE amd64
>Organization:
Noneorganization of PR author (multiple lines)>
>Environment:
System: FreeBSD megatron.madpilot.net 8.2-STABLE FreeBSD 8.2-STABLE #0: Thu Apr 21 12:44:44 CEST 2011 root at megatron.madpilot.net:/usr/obj/usr/src/sys/MEGATRON amd64
>Description:
Fix build when compiling against Berkeley DB 4.0.x.
Reported by: Pointyhat.
>How-To-Repeat:
Try to build the port on a freshly installed FreeBSD system or a
FreeBSD system with the now default Berkeley DB 4.0 installed.
>Fix:
diff -ruN squidguard.old/files/patch-src_sgDB.c squidguard/files/patch-src_sgDB.c
--- squidguard.old/files/patch-src_sgDB.c 2011-05-26 11:37:29.567341015 +0200
+++ squidguard/files/patch-src_sgDB.c 2011-05-26 11:38:04.342472346 +0200
@@ -1,27 +1,27 @@
---- src/sgDb.c.orig Mon May 14 08:40:12 2001
-+++ src/sgDb.c Thu Dec 29 23:31:32 2005
-@@ -97,14 +97,20 @@
+--- src/sgDb.c.orig 2008-07-14 20:29:41.000000000 +0200
++++ src/sgDb.c 2011-05-26 11:04:22.106201692 +0200
+@@ -119,14 +119,20 @@
flag = DB_CREATE;
if(createdb)
flag = flag | DB_TRUNCATE;
-- if ((ret =
-- Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
+- if ((ret =
+- Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
+ if ((ret = Db->dbp->open(Db->dbp,
-+#if DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR >= 41
-+ NULL,
++#if DB_VERSION_MINOR >= 1
++ NULL,
+#endif
-+ dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
++ dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
(void) Db->dbp->close(Db->dbp, 0);
sgLogFatalError("Error db_open: %s", strerror(ret));
}
} else {
-- if ((ret =
-- Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
+- if ((ret =
+- Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
+ if ((ret = Db->dbp->open(Db->dbp,
-+#if DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR >= 41
-+ NULL,
++#if DB_VERSION_MINOR >= 1
++ NULL,
+#endif
-+ dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
++ dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
sgLogFatalError("Error db_open: %s", strerror(ret));
}
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list