support different log_archive prototype in DB versions prior to 3.3
[citadel.git] / citadel / database_sleepycat.c
index 0af8b4b5a4200bf3f032567775ddb00c7cb5e35c..2c51ebc9d4f9ee10870d161b1b9e994ed7618a21 100644 (file)
@@ -183,7 +183,11 @@ static void cdb_cull_logs(void) {
        flags = DB_ARCH_ABS;
 
        /* Get the list of names. */
+#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR < 3
+       if ((ret = log_archive(dbenv, &list, flags, NULL)) != 0) {
+#else
        if ((ret = log_archive(dbenv, &list, flags)) != 0) {
+#endif
                lprintf(1, "cdb_cull_logs: %s\n", db_strerror(ret));
                return;
        }