On 14/07/11 08:16, Joachim Schmitz wrote:
> Hi folks
> 
>  
> 
> stat.c uses statbuf->st_blksize uncondtionally and on HP Nonstop struct stat
> doesn't have this (nor st_blocks).
> 
> Shouldn't it be checking for HAVE_STAT_ST_BLOCKS?

We should probably be doing:

diff --git a/src/stat.c b/src/stat.c
index 0ad465e..fffa97f 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -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':
       {

ST_BLKSIZE is defined in:
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/stat-size.h;hb=HEAD

cheers,
Pádraig.



Reply via email to