diff -up netatalk-2.0.3/bin/cnid/cnid_index.c.open_call netatalk-2.0.3/bin/cnid/cnid_index.c
--- netatalk-2.0.3/bin/cnid/cnid_index.c.open_call 2008-10-10 10:33:14.000000000 +0200
+++ netatalk-2.0.3/bin/cnid/cnid_index.c 2008-10-10 10:33:14.000000000 +0200
@@ -123,9 +123,9 @@ static int db_compat_open(DB *db, char *
int ret;
#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
- ret = db->open(db, db_txn, file, name, type, DB_CREATE, mode);
+ ret = (db->open)(db, db_txn, file, name, type, DB_CREATE, mode);
#else
- ret = db->open(db, file, name, type, DB_CREATE, mode);
+ ret = (db->open)(db, file, name, type, DB_CREATE, mode);
#endif
if (ret) {
@@ -353,7 +353,7 @@ static int dbif_env_init(void)
db_env->set_errfile(db_env, db_errlog);
db_env->set_verbose(db_env, DB_VERB_RECOVERY, 1);
db_env->set_verbose(db_env, DB_VERB_CHKPOINT, 1);
- if ((ret = db_env->open(db_env, ".", DBOPTIONS | DB_PRIVATE | DB_RECOVER, 0))) {
+ if ((ret = (db_env->open)(db_env, ".", DBOPTIONS | DB_PRIVATE | DB_RECOVER, 0))) {
LOG(log_error, logtype_cnid, "error opening DB environment: %s",
db_strerror(ret));
db_env->close(db_env, 0);
@@ -379,7 +379,7 @@ static int dbif_env_init(void)
}
if (db_errlog != NULL)
db_env->set_errfile(db_env, db_errlog);
- if ((ret = db_env->open(db_env, ".", DBOPTIONS , 0))) {
+ if ((ret = (db_env->open)(db_env, ".", DBOPTIONS , 0))) {
LOG(log_error, logtype_cnid, "error opening DB environment after recovery: %s",
db_strerror(ret));
db_env->close(db_env, 0);
diff -up netatalk-2.0.3/etc/cnid_dbd/dbif.c.open_call netatalk-2.0.3/etc/cnid_dbd/dbif.c
--- netatalk-2.0.3/etc/cnid_dbd/dbif.c.open_call 2008-10-10 10:33:14.000000000 +0200
+++ netatalk-2.0.3/etc/cnid_dbd/dbif.c 2008-10-10 10:33:14.000000000 +0200
@@ -77,9 +77,9 @@ static int db_compat_open(DB *db, char *
int ret;
#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
- ret = db->open(db, db_txn, file, name, type, DB_CREATE, mode);
+ ret = (db->open)(db, db_txn, file, name, type, DB_CREATE, mode);
#else
- ret = db->open(db, file, name, type, DB_CREATE, mode);
+ ret = (db->open)(db, file, name, type, DB_CREATE, mode);
#endif
if (ret) {
@@ -164,7 +164,7 @@ int dbif_env_init(struct db_param *dbp)
db_env->set_errfile(db_env, db_errlog);
db_env->set_verbose(db_env, DB_VERB_RECOVERY, 1);
db_env->set_verbose(db_env, DB_VERB_CHKPOINT, 1);
- if ((ret = db_env->open(db_env, ".", DBOPTIONS | DB_PRIVATE | DB_RECOVER, 0))) {
+ if ((ret = (db_env->open)(db_env, ".", DBOPTIONS | DB_PRIVATE | DB_RECOVER, 0))) {
LOG(log_error, logtype_cnid, "error opening DB environment: %s",
db_strerror(ret));
db_env->close(db_env, 0);
@@ -198,7 +198,7 @@ int dbif_env_init(struct db_param *dbp)
if (db_errlog != NULL)
db_env->set_errfile(db_env, db_errlog);
- if ((ret = db_env->open(db_env, ".", DBOPTIONS , 0))) {
+ if ((ret = (db_env->open)(db_env, ".", DBOPTIONS , 0))) {
LOG(log_error, logtype_cnid, "error opening DB environment after recovery: %s",
db_strerror(ret));
db_env->close(db_env, 0);
diff -up netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c.open_call netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c
--- netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c.open_call 2008-10-10 10:33:14.000000000 +0200
+++ netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c 2008-10-10 10:33:14.000000000 +0200
@@ -131,9 +131,9 @@ static int my_associate (DB *p, DB *s,
static int my_open(DB * p, const char *f, const char *d, DBTYPE t, u_int32_t flags, int mode)
{
#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
- return p->open(p, NULL, f, d, t, flags, mode);
+ return (p->open)(p, NULL, f, d, t, flags, mode);
#else
- return p->open(p, f, d, t, flags, mode);
+ return (p->open)(p, f, d, t, flags, mode);
#endif
}
@@ -275,7 +275,7 @@ struct _cnid_db *cnid_cdb_open(const cha
}
/* Open the database environment. */
- if ((rc = db->dbenv->open(db->dbenv, path, DBOPTIONS, 0666 & ~mask)) != 0) {
+ if ((rc = (db->dbenv->open)(db->dbenv, path, DBOPTIONS, 0666 & ~mask)) != 0) {
LOG(log_error, logtype_default, "cnid_open: dbenv->open (rw) of %s failed: %s", path, db_strerror(rc));
/* FIXME: This should probably go. Even if it worked, any use for a read-only DB? Didier? */
if (rc == DB_RUNRECOVERY) {
@@ -288,10 +288,10 @@ struct _cnid_db *cnid_cdb_open(const cha
/* We can't get a full transactional environment, so multi-access
* is out of the question. Let's assume a read-only environment,
* and try to at least get a shared memory pool. */
- if ((rc = db->dbenv->open(db->dbenv, path, DB_INIT_MPOOL, 0666 & ~mask)) != 0) {
+ if ((rc = (db->dbenv->open)(db->dbenv, path, DB_INIT_MPOOL, 0666 & ~mask)) != 0) {
/* Nope, not a MPOOL, either. Last-ditch effort: we'll try to
* open the environment with no flags. */
- if ((rc = db->dbenv->open(db->dbenv, path, 0, 0666 & ~mask)) != 0) {
+ if ((rc = (db->dbenv->open)(db->dbenv, path, 0, 0666 & ~mask)) != 0) {
LOG(log_error, logtype_default, "cnid_open: dbenv->open of %s failed: %s", path, db_strerror(rc));
goto fail_lock;
}
diff -up netatalk-2.0.3/libatalk/cnid/db3/cnid_db3_open.c.open_call netatalk-2.0.3/libatalk/cnid/db3/cnid_db3_open.c
--- netatalk-2.0.3/libatalk/cnid/db3/cnid_db3_open.c.open_call 2008-10-10 10:33:14.000000000 +0200
+++ netatalk-2.0.3/libatalk/cnid/db3/cnid_db3_open.c 2008-10-10 10:33:14.000000000 +0200
@@ -133,9 +133,9 @@ static int my_yield(void)
static int my_open(DB * p, const char *f, const char *d, DBTYPE t, u_int32_t flags, int mode)
{
#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
- return p->open(p, NULL, f, d, t, flags | DB_AUTO_COMMIT, mode);
+ return (p->open)(p, NULL, f, d, t, flags | DB_AUTO_COMMIT, mode);
#else
- return p->open(p, f, d, t, flags, mode);
+ return (p->open)(p, f, d, t, flags, mode);
#endif
}
@@ -350,7 +350,7 @@ struct _cnid_db *cnid_db3_open(const cha
#endif /* DB_VERSION_MINOR > 1 */
/* Open the database environment. */
- if ((rc = db->dbenv->open(db->dbenv, path, DBOPTIONS, 0666 & ~mask)) != 0) {
+ if ((rc = (db->dbenv->open)(db->dbenv, path, DBOPTIONS, 0666 & ~mask)) != 0) {
if (rc == DB_RUNRECOVERY) {
/* This is the mother of all errors. We _must_ fail here. */
LOG(log_error, logtype_default,
@@ -361,10 +361,10 @@ struct _cnid_db *cnid_db3_open(const cha
/* We can't get a full transactional environment, so multi-access
* is out of the question. Let's assume a read-only environment,
* and try to at least get a shared memory pool. */
- if ((rc = db->dbenv->open(db->dbenv, path, DB_INIT_MPOOL, 0666 & ~mask)) != 0) {
+ if ((rc = (db->dbenv->open)(db->dbenv, path, DB_INIT_MPOOL, 0666 & ~mask)) != 0) {
/* Nope, not a MPOOL, either. Last-ditch effort: we'll try to
* open the environment with no flags. */
- if ((rc = db->dbenv->open(db->dbenv, path, 0, 0666 & ~mask)) != 0) {
+ if ((rc = (db->dbenv->open)(db->dbenv, path, 0, 0666 & ~mask)) != 0) {
LOG(log_error, logtype_default, "cnid_open: dbenv->open of %s failed: %s", path, db_strerror(rc));
goto fail_lock;
}