From: Pierangelo Masarati Date: Mon, 6 Aug 2007 12:57:24 +0000 (+0000) Subject: workaround open() being a macro in glibc 2.6 (ITS#5075) X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~268 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dbad13ead28244c8e26477a42ae25daaabebb2fd;p=openldap workaround open() being a macro in glibc 2.6 (ITS#5075) --- diff --git a/build/openldap.m4 b/build/openldap.m4 index 060c797c2d..9f627b534c 100644 --- a/build/openldap.m4 +++ b/build/openldap.m4 @@ -628,9 +628,9 @@ main() } #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) - rc = env->open( env, NULL, flags, 0 ); + rc = (env->open)( env, NULL, flags, 0 ); #else - rc = env->open( env, NULL, NULL, flags, 0 ); + rc = (env->open)( env, NULL, NULL, flags, 0 ); #endif if ( rc == 0 ) { diff --git a/configure b/configure index 8677b5b13f..c2ef190006 100755 --- a/configure +++ b/configure @@ -31147,9 +31147,9 @@ main() } #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1) - rc = env->open( env, NULL, flags, 0 ); + rc = (env->open)( env, NULL, flags, 0 ); #else - rc = env->open( env, NULL, NULL, flags, 0 ); + rc = (env->open)( env, NULL, NULL, flags, 0 ); #endif if ( rc == 0 ) { diff --git a/servers/slapd/back-bdb/back-bdb.h b/servers/slapd/back-bdb/back-bdb.h index bf3c6ab825..8536150579 100644 --- a/servers/slapd/back-bdb/back-bdb.h +++ b/servers/slapd/back-bdb/back-bdb.h @@ -239,7 +239,7 @@ struct bdb_op_info { }; #define DB_OPEN(db, file, name, type, flags, mode) \ - (db)->open(db, file, name, type, flags, mode) + ((db)->open)(db, file, name, type, flags, mode) #if DB_VERSION_MAJOR < 4 #define LOCK_DETECT(env,f,t,a) lock_detect(env, f, t, a) @@ -270,7 +270,7 @@ struct bdb_op_info { #if DB_VERSION_FULL >= 0x04010011 #undef DB_OPEN #define DB_OPEN(db, file, name, type, flags, mode) \ - (db)->open(db, NULL, file, name, type, flags, mode) + ((db)->open)(db, NULL, file, name, type, flags, mode) #endif #endif diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 4b5f012335..650813ab0a 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -298,7 +298,7 @@ shm_retry: bdb->bi_dbenv->set_shm_key( bdb->bi_dbenv, bdb->bi_shm_key ); flags |= DB_SYSTEM_MEM; } - rc = bdb->bi_dbenv->open( bdb->bi_dbenv, dbhome, + rc = (bdb->bi_dbenv->open)( bdb->bi_dbenv, dbhome, flags | do_recover, bdb->bi_dbenv_mode ); if ( rc ) {