From: Kurt Zeilenga Date: Wed, 26 Sep 2001 01:54:39 +0000 (+0000) Subject: Fix build errors X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1056 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8c758b34f8a52aa1b60bfe94e040fd2f6498abea;p=openldap Fix build errors --- diff --git a/servers/slapd/back-bdb/idl.c b/servers/slapd/back-bdb/idl.c index e2cce0de7b..a2b54c20a2 100644 --- a/servers/slapd/back-bdb/idl.c +++ b/servers/slapd/back-bdb/idl.c @@ -106,13 +106,17 @@ unsigned bdb_idl_search( ID *ids, ID id ) #else /* (reverse) linear search */ - int i; - for( i=ids[0]; i; i-- ) { - if( id > ids[i] ) { - break; + { + int i; + + for( i=ids[0]; i; i-- ) { + if( id > ids[i] ) { + break; + } } + + return i+1; } - return i+1; #endif } diff --git a/servers/slapd/back-bdb/idl.h b/servers/slapd/back-bdb/idl.h index f09527667c..1d810907fd 100644 --- a/servers/slapd/back-bdb/idl.h +++ b/servers/slapd/back-bdb/idl.h @@ -12,7 +12,7 @@ #include "slap.h" -#ifdef 0 +#if 0 /* larger IDL sizes (which blow thread stacks) */ #define BDB_IDL_DB_SIZE (1<<16) /* 64K IDL on disk */ #define BDB_IDL_SIZE (1<<17) /* 128K IDL in memory */ diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index f64e5a3570..a61eeedc6f 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -83,7 +83,9 @@ static void *lock_detect_task( void *arg ) int rc; sleep( bdb->bi_lock_detect_seconds ); - rc = lock_detect( bdb->bi_dbenv, DB_LOCK_CONFLICT, bdb->bi_lock_detect, NULL ); + rc = lock_detect( bdb->bi_dbenv, 0, + bdb->bi_lock_detect, NULL ); + if( rc != 0 ) { break; }