diff options
Diffstat (limited to 'libio/iofopncook.c')
-rw-r--r-- | libio/iofopncook.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libio/iofopncook.c b/libio/iofopncook.c index 85ea35c22e..7b76826031 100644 --- a/libio/iofopncook.c +++ b/libio/iofopncook.c @@ -167,5 +167,10 @@ fopencookie (cookie, mode, io_functions) _IO_mask_flags (&new_f->cfile.__file, read_write, _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); + /* We use a negative number different from -1 for _fileno to mark that + this special stream is not associated with a real file, but still has + to be treated as such. */ + new_f->cfile.__file._fileno = -2; + return &new_f->cfile.__file; } |