diff options
Diffstat (limited to 'libio')
-rw-r--r-- | libio/fileops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libio/fileops.c b/libio/fileops.c index 720796a72a..e9e919306d 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -237,7 +237,7 @@ _IO_file_open (fp, filename, posix_mode, prot, read_write, is32not64) return NULL; fp->_fileno = fdesc; _IO_mask_flags (fp, read_write,_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); - if (read_write & _IO_IS_APPENDING) + if ((read_write & _IO_IS_APPENDING) && (read_write & _IO_NO_READS)) if (_IO_SEEKOFF (fp, (_IO_off64_t)0, _IO_seek_end, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD && errno != ESPIPE) { |