summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-10-14 03:56:42 +0000
committerTim Potter <tpot@samba.org>2003-10-14 03:56:42 +0000
commitec890d5c0fcb0ac9b3680d3c930614c726535d0a (patch)
treec5657792d5cc939223709a83740c1ed5c2396db2 /source3/libsmb
parentbde2b4a8ec725229584125a054c2c169bc9bd1aa (diff)
downloadsamba-ec890d5c0fcb0ac9b3680d3c930614c726535d0a.tar.gz
samba-ec890d5c0fcb0ac9b3680d3c930614c726535d0a.tar.bz2
samba-ec890d5c0fcb0ac9b3680d3c930614c726535d0a.zip
Enclose usage of st_blksize and st_blocks struct stat members in
#ifdef HAVE_STAT_ST_BLKSIZE and #ifdef HAVE_STAT_ST_BLOCKS, respectively. Fixes bug 550 reported by Joachim Schmitz <schmitz@hp.com>. (This used to be commit 18adfdbe0c6ed79ba8ac07956b1e7abc226556c3)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/libsmbclient.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 69c4d8f7a7..4eb7f49760 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -1139,8 +1139,12 @@ int smbc_setup_stat(SMBCCTX *context, struct stat *st, char *fname, size_t size,
if (!IS_DOS_READONLY(mode)) st->st_mode |= S_IWUSR;
st->st_size = size;
+#ifdef HAVE_STAT_ST_BLKSIZE
st->st_blksize = 512;
+#endif
+#ifdef HAVE_STAT_ST_BLOCKS
st->st_blocks = (size+511)/512;
+#endif
st->st_uid = getuid();
st->st_gid = getgid();