$OpenBSD: patch-Modules__bsddb_c,v 1.1 2009/01/01 21:03:27 djm Exp $
--- Modules/_bsddb.c.orig	Fri Dec 26 12:49:59 2008
+++ Modules/_bsddb.c	Fri Dec 26 12:52:07 2008
@@ -2465,11 +2465,7 @@ int DB_length(DBObject* self)
 
     if (self->haveStat) {  /* Has the stat function been called recently?  If
                               so, we can use the cached value. */
-#if (DBVER <= 32)
-        flags = DB_CACHED_COUNTS;
-#else
         flags = DB_FAST_STAT;
-#endif
     }
 
     MYDB_BEGIN_ALLOW_THREADS;
@@ -3841,7 +3837,7 @@ DBEnv_set_lk_max(DBEnvObject* self, PyObject* args)
     CHECK_ENV_NOT_CLOSED(self);
 
     MYDB_BEGIN_ALLOW_THREADS;
-    err = self->db_env->set_lk_max(self->db_env, max);
+    err = self->db_env->set_lk_max_locks(self->db_env, max);
     MYDB_END_ALLOW_THREADS;
     RETURN_IF_ERR();
     RETURN_NONE();
@@ -5039,7 +5035,9 @@ DL_EXPORT(void) init_bsddb(void)
     ADD_INT(d, DB_AFTER);
     ADD_INT(d, DB_APPEND);
     ADD_INT(d, DB_BEFORE);
+#if (DBVER < 45)
     ADD_INT(d, DB_CACHED_COUNTS);
+#endif
 #if (DBVER >= 41)
     _addIntToDict(d, "DB_CHECKPOINT", 0);
 #else
@@ -5074,7 +5072,9 @@ DL_EXPORT(void) init_bsddb(void)
     ADD_INT(d, DB_POSITION);
     ADD_INT(d, DB_PREV);
     ADD_INT(d, DB_PREV_NODUP);
+#if (DBVER < 45)
     ADD_INT(d, DB_RECORDCOUNT);
+#endif
     ADD_INT(d, DB_SET);
     ADD_INT(d, DB_SET_RANGE);
     ADD_INT(d, DB_SET_RECNO);
