summaryrefslogtreecommitdiff
path: root/source3/smbd/dosmode.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-10-14 04:00:08 +0000
committerTim Potter <tpot@samba.org>2003-10-14 04:00:08 +0000
commitc06d6e0afe489fc13c0e5c5485fcf6f1298c52dc (patch)
tree2a3de0236b8c880384a7e916c6bd6ffd69b9c828 /source3/smbd/dosmode.c
parentf631ec52abfca33fea5fe2b04c42e0ca68b17359 (diff)
downloadsamba-c06d6e0afe489fc13c0e5c5485fcf6f1298c52dc.tar.gz
samba-c06d6e0afe489fc13c0e5c5485fcf6f1298c52dc.tar.bz2
samba-c06d6e0afe489fc13c0e5c5485fcf6f1298c52dc.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 3d777f5389ed6b4ab8c42eb110d41f7df309bead)
Diffstat (limited to 'source3/smbd/dosmode.c')
-rw-r--r--source3/smbd/dosmode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index aaee41b546..f88964123e 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -136,9 +136,11 @@ uint32 dos_mode(connection_struct *conn,char *path,SMB_STRUCT_STAT *sbuf)
if (S_ISDIR(sbuf->st_mode))
result = aDIR | (result & aRONLY);
+#if defined (HAVE_STAT_ST_BLOCKS) && defined (HAVE_STAT_ST_BLKSIZE)
if (sbuf->st_size > sbuf->st_blocks * (SMB_OFF_T)sbuf->st_blksize) {
result |= FILE_ATTRIBUTE_SPARSE;
}
+#endif
#ifdef S_ISLNK
#if LINKS_READ_ONLY