3183e5f
--- netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c.old	2004-03-22 05:38:51.000000000 +0100
3183e5f
+++ netatalk-2.0.3/libatalk/cnid/cdb/cnid_cdb_open.c	2007-09-11 17:59:59.000000000 +0200
3183e5f
@@ -131,9 +131,9 @@
3183e5f
 static int my_open(DB * p, const char *f, const char *d, DBTYPE t, u_int32_t flags, int mode)
3183e5f
 {
3183e5f
 #if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
3183e5f
-    return p->open(p, NULL, f, d, t, flags, mode);
3183e5f
+    return (p->open)(p, NULL, f, d, t, flags, mode);
3183e5f
 #else
3183e5f
-    return p->open(p, f, d, t, flags, mode);
3183e5f
+    return (p->open)(p, f, d, t, flags, mode);
3183e5f
 #endif
3183e5f
 }
3183e5f
 
3183e5f
@@ -275,7 +275,7 @@
3183e5f
     }
3183e5f
 
3183e5f
     /* Open the database environment. */
3183e5f
-    if ((rc = db->dbenv->open(db->dbenv, path, DBOPTIONS, 0666 & ~mask)) != 0) {
3183e5f
+    if ((rc = (db->dbenv->open)(db->dbenv, path, DBOPTIONS, 0666 & ~mask)) != 0) {
3183e5f
 	LOG(log_error, logtype_default, "cnid_open: dbenv->open (rw) of %s failed: %s", path, db_strerror(rc));
3183e5f
 	/* FIXME: This should probably go. Even if it worked, any use for a read-only DB? Didier? */
3183e5f
         if (rc == DB_RUNRECOVERY) {
3183e5f
@@ -288,10 +288,10 @@
3183e5f
         /* We can't get a full transactional environment, so multi-access
3183e5f
          * is out of the question.  Let's assume a read-only environment,
3183e5f
          * and try to at least get a shared memory pool. */
3183e5f
-        if ((rc = db->dbenv->open(db->dbenv, path, DB_INIT_MPOOL, 0666 & ~mask)) != 0) {
3183e5f
+        if ((rc = (db->dbenv->open)(db->dbenv, path, DB_INIT_MPOOL, 0666 & ~mask)) != 0) {
3183e5f
             /* Nope, not a MPOOL, either.  Last-ditch effort: we'll try to
3183e5f
              * open the environment with no flags. */
3183e5f
-            if ((rc = db->dbenv->open(db->dbenv, path, 0, 0666 & ~mask)) != 0) {
3183e5f
+            if ((rc = (db->dbenv->open)(db->dbenv, path, 0, 0666 & ~mask)) != 0) {
3183e5f
                 LOG(log_error, logtype_default, "cnid_open: dbenv->open of %s failed: %s", path, db_strerror(rc));
3183e5f
                 goto fail_lock;
3183e5f
             }