]> arthur.barton.de Git - netatalk.git/commitdiff
fix BDB 4.3 compile
authorbfernhomberg <bfernhomberg>
Thu, 12 May 2005 00:20:24 +0000 (00:20 +0000)
committerbfernhomberg <bfernhomberg>
Thu, 12 May 2005 00:20:24 +0000 (00:20 +0000)
bin/cnid/cnid_index.c
etc/cnid_dbd/dbif.c

index 42265a79cd688b116b52a48f8b5561a5a009b6b8..388cf69f66d236a6819fe939949a849237928eb8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_index.c,v 1.2 2005-04-28 20:49:19 bfernhomberg Exp $
+ * $Id: cnid_index.c,v 1.3 2005-05-12 00:20:24 bfernhomberg 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 >= 1)
+    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 15f2f7dbfb9786551db0c39f45bfdb11a717a18b..9cb756af67f38049e82a1c427de250dac5b40c68 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbif.c,v 1.2 2005-04-28 20:49:48 bfernhomberg Exp $
+ * $Id: dbif.c,v 1.3 2005-05-12 00:20:27 bfernhomberg 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));