Hi Pádraig, The patch looks good. Just nitpicking about the comments:
> + /* Either process a partial fread() from this loop, > + or the fread() in afalg_stream may have gotten EOF. > + We need to avoid a subsequent fread() due to glibc BZ 1190. */ We need to avoid a subsequent fread(), not only for glibc, but also on platforms with SystemV heritage. [1] > + /* Assume EOF is not sticky. See: > + <https://sourceware.org/bugzilla/show_bug.cgi?id=19476>. */ > + if (feof (stream)) You can't assume that EOF is not sticky, because per [1] "BSDs always had sticky EOF". How about /* Don't assume that EOF is sticky. See: <https://sourceware.org/bugzilla/show_bug.cgi?id=19476>. */ Bruno [1] https://sourceware.org/bugzilla/show_bug.cgi?id=1190