GNOME Bugzilla – Bug 162569
newer versions of bdb have an argument to a function again
Last modified: 2007-02-06 15:57:03 UTC
You need a new version of db installed. Here it is 4.3.27. If you build libgda against it it will fail, due to a "too few arguments" error: gda-bdb-recordset.c: In function `gda_bdb_recordset_new': gda-bdb-recordset.c:234: warning: passing arg 2 of pointer to function from incompatible pointer type gda-bdb-recordset.c:234: error: too few arguments to function make[2]: *** [gda-bdb-recordset.lo] Error 1 I don't know in which version excatly of bdb this has been reintroduced again. extending line #231 like this #if BDB_VERSION < 40000 || BDB_VERSION > 40300 worked for me. PS: is there a component for bdb, and what is the name - so far filed under general
I'm not sure that's the correct fix. That #if covers the 3rd argument, but the new transaction parameter is the 2nd argument. A better fix might be something like this: /* get the number of records in the database */ ret = dbp->stat (dbp, #if BDB_VERSION > 40300 NULL, #endif &statp, #if BDB_VERSION < 40000 NULL, #endif More info here: http://www.sleepycat.com/docs/ref/upgrade.4.3/stat.html The diff for DB between 4.2.52 and 4.3.21 is: - int (*stat) __P((DB *, void *, u_int32_t)); + int (*stat) __P((DB *, DB_TXN *, void *, u_int32_t)); + int (*stat_print) __P((DB *, u_int32_t)); The diff for DB between ... strange... it's the same... Ahh... looks like the signature changed between 3.2.9 and 3.3.11: - int (*set_realloc) __P((DB *, void *(*)(void *, size_t))); - int (*stat) __P((DB *, void *, void *(*)(size_t), u_int32_t)); + int (*stat) __P((DB *, void *, u_int32_t));
I'm too stupid to count up to three ;) Your fix should handle that correctly, at least according to the type and number of arguments that DB->stat expects. Form the specs: If the operation is to be transaction-protected, the txnid parameter is a transaction handle returned from DB_ENV->txn_begin; otherwise, NULL.
It would be nice if someone could attach a patch.
Is this a duplicate of bug #370349?
Please reopen if this is still a problem in the latest versions.