]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: avoid a st_blksize compile failure on some systems
authorPádraig Brady <P@draigBrady.com>
Fri, 15 Jul 2011 15:18:18 +0000 (16:18 +0100)
committerPádraig Brady <P@draigBrady.com>
Fri, 15 Jul 2011 15:23:28 +0000 (16:23 +0100)
* src/stat.c (print_stat): Use ST_BLKSIZE() rather than
accessing st_blksize directly, which is not present on
NonStop at least.  Reported by Joachim Schmitz.

src/stat.c

index 0ad465e223b698236bf26fbd2b22f16a4e990153..535e1418492c4cc2b0b132b71842f9255f92b1fe 100644 (file)
@@ -951,7 +951,7 @@ print_stat (char *pformat, size_t prefix_len, unsigned int m,
       out_uint (pformat, prefix_len, ST_NBLOCKS (*statbuf));
       break;
     case 'o':
-      out_uint (pformat, prefix_len, statbuf->st_blksize);
+      out_uint (pformat, prefix_len, ST_BLKSIZE (*statbuf));
       break;
     case 'w':
       {