Trent Mick points out that the BSD DB also provides an ndbm compatibility
layer.  If that is available, consider that as an option as well.
diff --git a/Modules/dbmmodule.c b/Modules/dbmmodule.c
index afb039b..9fb1225 100644
--- a/Modules/dbmmodule.c
+++ b/Modules/dbmmodule.c
@@ -13,6 +13,8 @@
  */
 #if defined(HAVE_NDBM_H)
 #include <ndbm.h>
+#elif defined(HAVE_DB1_NDBM_H)
+#include <db1/ndbm.h>
 #elif defined(HAVE_GDBM_NDBM_H)
 #include <gdbm/ndbm.h>
 #else