pkgsrc/editors/nvi/patches/patch-aa
wiz 264c1fb0e3 Fix build with automake-1.13.
While here, use a better WRKSRC and rebase patches.
2013-01-23 17:26:07 +00:00

19 lines
710 B
Text

$NetBSD: patch-aa,v 1.5 2013/01/23 17:26:07 wiz 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-19 03:41:42.000000000 +1100
+++ common/db.h
@@ -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