pkgsrc/editors/nvi/patches/patch-aa
2008-12-21 23:02:24 +00:00

19 lines
752 B
Text

$NetBSD: patch-aa,v 1.3 2008/12/21 23:02:24 epg Exp $
BDB 4.4 and up requires DB_CREATE or it will spew "DB_CREATE must be
specified to create databases." when nvi edits a file.
--- ../common/db.h.orig 2007-11-18 16:41:42.000000000 +0000
+++ ../common/db.h 2008-12-21 00:18:11.000000000 +0000
@@ -16,7 +16,10 @@
(env)->remove(env, path, NULL, flags)
#endif
-#if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1
+#if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 4
+#define db_open(db,file,type,flags,mode) \
+ (db)->open(db, NULL, file, NULL, type, flags | DB_CREATE, mode)
+#elif DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1
#define db_open(db,file,type,flags,mode) \
(db)->open(db, NULL, file, NULL, type, flags, mode)
#else