[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#5620) Compile problem with Berkeley DB 4.7.25

Full_Name: Marco Walther
Version: 2.4.11
OS: SunOS 5.11 snv_70b sun4v sparc SUNW,SPARC
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

The problem is in servers/slapd/back-bdb/cache.c and

The db-4.7.?? moved the lk_handle from the public DB_ENV to a private ENV
structure. So it's officially not accessible any more.

I'll include a little diff to show the problem. But I don't think my `quick
compile' fix is completely correct.

I'm more interested in the client libraries than the servers right now.

--- init.c.orig Wed Jul 16 22:56:00 2008
+++ init.c      Wed Jul 16 23:01:26 2008
@@ -503,9 +503,15 @@

        if ( !quick ) {
-#if DB_VERSION_FULL >= 0x04060012
+#if DB_VERSION_FULL >= 0x04070025
+               # XXX mw79288 real hack!!
+       #include "/export/home/marcow/src/db-4.7.25/build_unix/db_int.h"
                u_int32_t lid;
                XLOCK_ID(bdb->bi_dbenv, &lid);
+               __lock_getlocker(bdb->bi_dbenv->env->lk_handle, lid, 0,
+#elsif DB_VERSION_FULL >= 0x04060012
+               u_int32_t lid;
+               XLOCK_ID(bdb->bi_dbenv, &lid);
                __lock_getlocker(bdb->bi_dbenv->lk_handle, lid, 0,
                XLOCK_ID(bdb->bi_dbenv, &bdb->bi_cache.c_locker);