svn commit: samba r8184 - branches/SAMBA_3_0/source/libsmb
trunk/source/libsmb
jerry at samba.org
jerry at samba.org
Wed Jul 6 14:46:36 GMT 2005
Author: jerry
Date: 2005-07-06 14:46:36 +0000 (Wed, 06 Jul 2005)
New Revision: 8184
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8184
Log:
fix build issue on Solaris in smbclient
Modified:
branches/SAMBA_3_0/source/libsmb/clifile.c
trunk/source/libsmb/clifile.c
Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/clifile.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/clifile.c 2005-07-06 14:12:01 UTC (rev 8183)
+++ branches/SAMBA_3_0/source/libsmb/clifile.c 2005-07-06 14:46:36 UTC (rev 8184)
@@ -262,7 +262,12 @@
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 */
Modified: trunk/source/libsmb/clifile.c
===================================================================
--- trunk/source/libsmb/clifile.c 2005-07-06 14:12:01 UTC (rev 8183)
+++ trunk/source/libsmb/clifile.c 2005-07-06 14:46:36 UTC (rev 8184)
@@ -262,7 +262,12 @@
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 */
More information about the samba-cvs
mailing list