aboutsummaryrefslogtreecommitdiff
path: root/compat/dbmopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/dbmopen.c')
-rw-r--r--compat/dbmopen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/dbmopen.c b/compat/dbmopen.c
index 9e66acc..0125903 100644
--- a/compat/dbmopen.c
+++ b/compat/dbmopen.c
@@ -104,7 +104,7 @@ ndbm_open_dir_file0 (const char *file_name, int pagfd, int mode)
}
else
{
- fd = open (file_name, O_RDWR);
+ fd = open (file_name, mode == GDBM_READER ? O_RDONLY : O_RDWR);
if (fd == -1)
{
gdbm_errno = GDBM_FILE_OPEN_ERROR;

Return to:

Send suggestions and report system problems to the System administrator.