From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 26 09:50:08 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52EAE106564A for ; Thu, 26 May 2011 09:50:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 25CD88FC16 for ; Thu, 26 May 2011 09:50:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4Q9o7D5038280 for ; Thu, 26 May 2011 09:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4Q9o7Ok038279; Thu, 26 May 2011 09:50:07 GMT (envelope-from gnats) Resent-Date: Thu, 26 May 2011 09:50:07 GMT Resent-Message-Id: <201105260950.p4Q9o7Ok038279@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Guido Falsi Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C5BF106566B for ; Thu, 26 May 2011 09:48:37 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from megatron.madpilot.net (megatron.madpilot.net [88.149.173.206]) by mx1.freebsd.org (Postfix) with ESMTP id 2018B8FC17 for ; Thu, 26 May 2011 09:48:37 +0000 (UTC) Received: from megatron.madpilot.net (localhost [127.0.0.1]) by megatron.madpilot.net (Postfix) with ESMTP id 4B5FA1A2C for ; Thu, 26 May 2011 11:48:36 +0200 (CEST) Received: from megatron.madpilot.net ([127.0.0.1]) by megatron.madpilot.net (megatron.madpilot.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pkbghQ48fRuI for ; Thu, 26 May 2011 11:48:29 +0200 (CEST) Received: by megatron.madpilot.net (Postfix, from userid 1000) id 6BD1D1A24; Thu, 26 May 2011 11:48:29 +0200 (CEST) Message-Id: <20110526094829.6BD1D1A24@megatron.madpilot.net> Date: Thu, 26 May 2011 11:48:29 +0200 (CEST) From: Guido Falsi To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/157340: [maintainer-update] www/squidguard: Fix build with Berkeley DB 4.0.x X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Guido Falsi List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 09:50:08 -0000 >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@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: