summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-07-06 14:46:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:15 -0500
commit38e006fe8bc81c950302cc1e1700075b84eec329 (patch)
tree03497d88ac0d630944f7a13915ebae40d5a75648 /source3
parent5873b414750a1536a75463f0bfb2b5cc717946b6 (diff)
downloadsamba-38e006fe8bc81c950302cc1e1700075b84eec329.tar.gz
samba-38e006fe8bc81c950302cc1e1700075b84eec329.tar.bz2
samba-38e006fe8bc81c950302cc1e1700075b84eec329.zip
r8184: fix build issue on Solaris in smbclient
(This used to be commit 137d270ee3bec297732380050bb53cf6b5487914)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clifile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 90ca98d17e..2fb5b456cc 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/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 */