apr1 and bdb5.x

Kurt Lidl lidl at pix.net
Fri Oct 1 15:13:51 UTC 2010


Greetings.

I had some problem rebuilding my apache22 installation today
on one of my servers.  That machine uses bdb50, and the
compilation of the apr-util-1.3.9 fails when it encounters
the bdb50 db.h file.

The following patch file makes it work for me:

-Kurt

-------------- next part --------------
--- apr-util-1.3.9/dbm/apr_dbm_berkeleydb.c.orig	2008-11-21 03:22:35.000000000 -0500
+++ apr-util-1.3.9/dbm/apr_dbm_berkeleydb.c	2010-07-28 12:00:49.294755051 -0400
@@ -37,13 +37,13 @@
  * DB_185, DB2, DB3, and DB4.
  */
 
-#if   defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 4)
+#if   defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR >= 4)
 /* We will treat anything greater than 4.1 as DB4.
  * We can treat 4.0 as DB3.
  */
-#if   defined(DB_VERSION_MINOR) && (DB_VERSION_MINOR >= 1)
+#if   DB_VERSION_MAJOR > 4 || defined(DB_VERSION_MINOR) && (DB_VERSION_MINOR >= 1)
 #define DB_VER 4
-#else
+#elif DB_VERSION_MAJOR == 4
 #define DB_VER 3
 #endif
 #elif defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 3)


More information about the freebsd-apache mailing list