This patch adds support for Berkeley DB 5.0.x to apr-util.

ttyl
bero
--- apr-util-1.3.9/dbm/apr_dbm_berkeleydb.c.ark	2010-04-14 17:57:37.846342893 +0200
+++ apr-util-1.3.9/dbm/apr_dbm_berkeleydb.c	2010-04-14 18:44:28.368839346 +0200
@@ -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)

Reply via email to