-/* $OpenBSD: db.c,v 1.11 2015/05/11 00:42:54 guenther Exp $ */
+/* $OpenBSD: db.c,v 1.12 2015/05/11 06:31:17 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
#define DB_FLAGS (DB_LOCK | DB_SHMEM | DB_TXN)
#define USE_OPEN_FLAGS \
(O_CREAT | O_EXCL | O_EXLOCK | O_NOFOLLOW | O_NONBLOCK | \
- O_SHLOCK | O_SYNC | O_TRUNC)
+ O_ACCMODE | O_SHLOCK | O_SYNC | O_TRUNC)
if (((flags & O_ACCMODE) == O_RDONLY || (flags & O_ACCMODE) == O_RDWR)
- && (flags & ~(O_ACCMODE | USE_OPEN_FLAGS | DB_FLAGS)) == 0)
+ && (flags & ~(USE_OPEN_FLAGS | DB_FLAGS)) == 0)
switch (type) {
case DB_BTREE:
return (__bt_open(fname, flags & USE_OPEN_FLAGS,