Blob Blame History Raw
--- netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c.old	2004-03-22 05:38:51.000000000 +0100
+++ netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c	2007-09-11 17:59:59.000000000 +0200
@@ -131,9 +131,9 @@
 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 @@
     }
 
     /* 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 @@
         /* 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;
             }