diff options
Diffstat (limited to 'libguile/filesys.c')
-rw-r--r-- | libguile/filesys.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libguile/filesys.c b/libguile/filesys.c index cccb39787..ae164fe83 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -1489,6 +1489,12 @@ SCM_DEFINE (scm_i_mkstemp, "mkstemp!", 1, 1, 0, else { open_flags = scm_i_mode_to_open_flags (mode, &is_binary, FUNC_NAME); + /* mkostemp(2) only defines O_APPEND, O_SYNC, and O_CLOEXEC to be + useful, as O_RDWR|O_CREAT|O_EXCL are implicitly added. It also + notes that other flags may error on some systems, which turns + out to be the case. Of those flags, O_APPEND is the only one + of interest anyway, so limit to that flag. */ + open_flags &= O_APPEND; mode_bits = scm_i_mode_bits (mode); } |