From ec890d5c0fcb0ac9b3680d3c930614c726535d0a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 14 Oct 2003 03:56:42 +0000 Subject: 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 . (This used to be commit 18adfdbe0c6ed79ba8ac07956b1e7abc226556c3) --- source3/smbd/dosmode.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/smbd') 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 -- cgit