From 71b7437d9f75f425db7cccdc06559b6fcacbec15 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 6 Jul 2005 14:46:36 +0000 Subject: [PATCH] r8184: fix build issue on Solaris in smbclient --- source/libsmb/clifile.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/libsmb/clifile.c b/source/libsmb/clifile.c index 90ca98d17eb..2fb5b456cc4 100644 --- a/source/libsmb/clifile.c +++ b/source/libsmb/clifile.c @@ -262,7 +262,12 @@ BOOL cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbu sbuf->st_size = IVAL2_TO_SMB_BIG_UINT(rdata,0); /* total size, in bytes */ sbuf->st_blocks = IVAL2_TO_SMB_BIG_UINT(rdata,8); /* number of blocks allocated */ +#if defined (HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE) sbuf->st_blocks /= STAT_ST_BLOCKSIZE; +#else + /* assume 512 byte blocks */ + sbuf->st_blocks /= 512; +#endif sbuf->st_ctime = interpret_long_date(rdata + 16); /* time of last change */ sbuf->st_atime = interpret_long_date(rdata + 24); /* time of last access */ sbuf->st_mtime = interpret_long_date(rdata + 32); /* time of last modification */ -- 2.11.4.GIT