]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tail: fix tailing non seekable files on certain systems
authorPádraig Brady <P@draigBrady.com>
Sun, 10 Dec 2017 04:18:22 +0000 (20:18 -0800)
committerPádraig Brady <P@draigBrady.com>
Mon, 11 Dec 2017 01:13:18 +0000 (17:13 -0800)
commite44df9d3f52d261719786ba54d91cca142389daa
tree4466cab97b7d24d27926b90b32fe8de4361ca248
parent8fb32039bcc137baec9bf80c206077a73cec8878
tail: fix tailing non seekable files on certain systems

* src/tail.c (tail_bytes): On systems were blksize_t is unsigned
and the same size or wider than off_t (android for example),
our initialized (off_t) -1 would be promoted to unsigned before
comparison, and thus fail to follow the appropriate path.
* tests/tail-2/tail-c.sh: Add a test case.
* NEWS: Mention the fix.
This issue was introduced in commit v8.23-47-g2662702
Reported at https://github.com/termux/termux-app/issues/233
NEWS
src/tail.c
tests/tail-2/tail-c.sh