1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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)
|