diff options
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r-- | libgfortran/io/unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index 912364b56db..e5fc6e19818 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1353,7 +1353,7 @@ regular_file2 (const char *path, st_parameter_open *opp, unit_flags *flags) flags->action = ACTION_READWRITE; return fd; } - if (errno != EACCES && errno != EROFS) + if (errno != EACCES && errno != EPERM && errno != EROFS) return fd; /* retry for read-only access */ @@ -1369,7 +1369,7 @@ regular_file2 (const char *path, st_parameter_open *opp, unit_flags *flags) return fd; /* success */ } - if (errno != EACCES && errno != ENOENT) + if (errno != EACCES && errno != EPERM && errno != ENOENT) return fd; /* failure */ /* retry for write-only access */ |