diff options
Diffstat (limited to 'libio')
-rw-r--r-- | libio/stdfiles.c | 2 | ||||
-rw-r--r-- | libio/strops.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/libio/stdfiles.c b/libio/stdfiles.c index 56861666af..7eb828350c 100644 --- a/libio/stdfiles.c +++ b/libio/stdfiles.c @@ -39,7 +39,7 @@ = {{FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps},}; \ default_symbol_version (INAME, NAME, GLIBC_2.1) #else -#define DEF_STDFILE(INAME, FD, CHAIN, FLAGS) \ +#define DEF_STDFILE(INAME, NAME, FD, CHAIN, FLAGS) \ struct _IO_FILE_complete INAME \ = {{FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps},}; \ default_symbol_version (INAME, NAME, GLIBC_2.1) diff --git a/libio/strops.c b/libio/strops.c index c596315b60..01f8d6eeb7 100644 --- a/libio/strops.c +++ b/libio/strops.c @@ -215,6 +215,9 @@ _IO_str_seekoff (fp, offset, dir, mode) _IO_ssize_t cur_size = _IO_str_count (fp); _IO_fpos64_t new_pos = EOF; + if (mode == 0 && (fp->_flags & _IO_TIED_PUT_GET)) + mode = (fp->_flags & _IO_CURRENTLY_PUTTING ? _IOS_OUTPUT : _IOS_INPUT); + /* Move the get pointer, if requested. */ if (mode & _IOS_INPUT) { |