aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c
index f720c76c458..e703337edc7 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -60,6 +60,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
60#include <math.h> 60#include <math.h>
61#endif /* LISP_FLOAT_TYPE */ 61#endif /* LISP_FLOAT_TYPE */
62 62
63#ifndef O_RDONLY
64#define O_RDONLY 0
65#endif
66
63extern int errno; 67extern int errno;
64 68
65Lisp_Object Qread_char, Qget_file_char, Qstandard_input, Qcurrent_load_list; 69Lisp_Object Qread_char, Qget_file_char, Qstandard_input, Qcurrent_load_list;
@@ -577,7 +581,7 @@ openp (path, str, suffix, storeptr, exec_only)
577 if (exec_only) 581 if (exec_only)
578 fd = (access (fn, X_OK) == 0) ? 1 : -1; 582 fd = (access (fn, X_OK) == 0) ? 1 : -1;
579 else 583 else
580 fd = open (fn, 0, 0); 584 fd = open (fn, O_RDONLY, 0);
581 585
582 if (fd >= 0) 586 if (fd >= 0)
583 { 587 {