]> arthur.barton.de Git - netatalk.git/commitdiff
Berkeley DB 4.3 patch from HEAD.
authordidg <didg>
Tue, 13 Sep 2005 16:57:44 +0000 (16:57 +0000)
committerdidg <didg>
Tue, 13 Sep 2005 16:57:44 +0000 (16:57 +0000)
bin/cnid/cnid_index.c
etc/cnid_dbd/dbif.c

index 169805c69a96a40c2c98d712b01f6ef8411ad795..d81be2e1baa5cbe65c762fb9ca3fc30a73dd6b27 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_index.c,v 1.1.2.4 2005-04-10 12:49:18 didg Exp $
+ * $Id: cnid_index.c,v 1.1.2.5 2005-09-13 16:57:44 didg Exp $
  *
  * All Rights Reserved.  See COPYING.
  */
@@ -274,7 +274,11 @@ static int dbif_count(const int dbi, u_int32_t *count)
     DB_BTREE_STAT *sp;
     DB *db = db_table[dbi].db;
 
+#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)
+    ret = db->stat(db, db_txn, &sp, 0);
+#else
     ret = db->stat(db, &sp, 0);
+#endif
 
     if (ret) {
         LOG(log_error, logtype_cnid, "error getting stat infotmation on database: %s", db_strerror(errno));
index c7eda9bd8e5bd700d9747c5c49598d0ecd5dcb3f..05377055d77b1c606135363d148419843992db6a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbif.c,v 1.1.4.15.2.1 2004-12-21 13:36:12 didg Exp $
+ * $Id: dbif.c,v 1.1.4.15.2.2 2005-09-13 16:57:45 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -514,7 +514,11 @@ int dbif_count(const int dbi, u_int32_t *count)
     DB_BTREE_STAT *sp;
     DB *db = db_table[dbi].db;
 
+#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)
+    ret = db->stat(db, db_txn, &sp, 0);
+#else
     ret = db->stat(db, &sp, 0);
+#endif
 
     if (ret) {
         LOG(log_error, logtype_cnid, "error getting stat infotmation on database: %s", db_strerror(errno));