summaryrefslogtreecommitdiffstats
path: root/vi/db47-hack.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vi/db47-hack.patch')
-rw-r--r--vi/db47-hack.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/vi/db47-hack.patch b/vi/db47-hack.patch
new file mode 100644
index 0000000..f2f206b
--- /dev/null
+++ b/vi/db47-hack.patch
@@ -0,0 +1,27 @@
+diff --git a/cl/cl_main.c b/cl/cl_main.c
+index 0ecbe44..87feb28 100644
+--- a/cl/cl_main.c
++++ b/cl/cl_main.c
+@@ -57,6 +57,9 @@ main(int argc, char **argv)
+ int rval;
+ char **p_av, **t_av, *ttype;
+
++ /* Hack for db-4.7. */
++ unsetenv("LANG");
++ unsetenv("LC_ALL");
+ /* If loaded at 0 and jumping through a NULL pointer, stop. */
+ if (reenter++)
+ abort();
+diff --git a/common/db.h b/common/db.h
+index fd1dc64..00a7ce7 100644
+--- a/common/db.h
++++ b/common/db.h
+@@ -18,7 +18,7 @@
+
+ #if 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)
++ (db)->open(db, NULL, file, NULL, type, flags | DB_CREATE, mode)
+ #else
+ #define db_open(db,file,type,flags,mode) \
+ (db)->open(db, file, NULL, type, flags, mode) \ No newline at end of file