]> sourceware.org Git - glibc.git/commit
Fix fflush handling for mmap files after ungetc (bug 32535)
authorJoseph Myers <josmyers@redhat.com>
Tue, 28 Jan 2025 23:20:08 +0000 (23:20 +0000)
committerJoseph Myers <josmyers@redhat.com>
Tue, 28 Jan 2025 23:20:08 +0000 (23:20 +0000)
commit3ff3b9997cfef891ba33a14f1dcba0310d96369c
tree087c3af4b133e92e7e7063c695ae9bf9120b31b6
parent0dcc0b2f63051863187dc678964eb17761b1a820
Fix fflush handling for mmap files after ungetc (bug 32535)

As discussed in bug 32535, fflush fails on files opened for reading
using mmap after ungetc.  Fix the logic to handle this case and still
compute the file offset correctly.

Tested for x86_64.
libio/fileops.c
stdio-common/Makefile
stdio-common/tst-fflush-mmap.c [new file with mode: 0644]
This page took 0.040873 seconds and 5 git commands to generate.