Fredrik Fornwall
8 years ago
2 changed files with 20 additions and 1 deletions
@ -0,0 +1,19 @@ |
|||
diff -u -r ../coreutils-8.26/lib/stat-size.h ./lib/stat-size.h
|
|||
--- ../coreutils-8.26/lib/stat-size.h 2016-07-15 15:47:39.000000000 -0400
|
|||
+++ ./lib/stat-size.h 2017-01-09 16:49:31.758957157 -0500
|
|||
@@ -71,9 +71,13 @@
|
|||
suffice, since "cat" sometimes multiplies the result by 4.) If |
|||
anyone knows of a system for which this limit is too small, please |
|||
report it as a bug in this code. */ |
|||
-# define ST_BLKSIZE(statbuf) ((0 < (statbuf).st_blksize \
|
|||
+/* Termux patch: Cast to long since on 32-bit Android this otherwise
|
|||
+ results in an unsigned long, which breaks comparison with e.g.
|
|||
+ signed off_t in tail.c, see:
|
|||
+ https://github.com/termux/termux-app/issues/233 */
|
|||
+# define ST_BLKSIZE(statbuf) ((long) ((0 < (statbuf).st_blksize \
|
|||
&& (statbuf).st_blksize <= ((size_t)-1) / 8 + 1) \ |
|||
- ? (statbuf).st_blksize : DEV_BSIZE)
|
|||
+ ? (statbuf).st_blksize : DEV_BSIZE))
|
|||
# if defined hpux || defined __hpux__ || defined __hpux |
|||
/* HP-UX counts st_blocks in 1024-byte units. |
|||
This loses when mixing HP-UX and BSD file systems with NFS. */ |
Loading…
Reference in new issue