From 347f63992280b4fe15c92848bc27026cc367dcc2 Mon Sep 17 00:00:00 2001 From: danj Date: Sat, 13 May 2006 00:41:04 +0000 Subject: [PATCH] compat for 4.2 --- bdb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bdb.c b/bdb.c index 1753928..b6f7389 100644 --- a/bdb.c +++ b/bdb.c @@ -1581,7 +1581,11 @@ VALUE db_stat(VALUE obj, VALUE vtxn, VALUE vflags) rv=dbh->db->get_type(dbh->db,&dbtype); if (rv) raise_error(rv,"db_stat %s",db_strerror(rv)); +#if DB_VERSION_MINOR > 2 rv=dbh->db->stat(dbh->db,txn?txn->txn:NULL,&(su.stat),flags); +#else + rv=dbh->db->stat(dbh->db,&(su.stat),flags); +#endif if (rv) raise_error(rv,"db_stat %s",db_strerror(rv)); @@ -1632,7 +1636,9 @@ VALUE db_stat(VALUE obj, VALUE vtxn, VALUE vflags) bs_int(bt_leaf_pg); /* Leaf pages. */ bs_int(bt_dup_pg); /* Duplicate pages. */ bs_int(bt_over_pg); /* Overflow pages. */ +#if DB_VERSION_MINOR > 2 bs_int(bt_empty_pg); /* Empty pages. */ +#endif bs_int(bt_free); /* Pages on the free list. */ bs_int(bt_int_pgfree); /* Bytes free in internal pages. */ bs_int(bt_leaf_pgfree); /* Bytes free in leaf pages. */