Hi there st_blocks and st_blksize are used unconditionaly: --- source/libsmb/libsmbclient.c.orig 2003-06-07 19:57:33.000000000 +0200 +++ source/libsmb/libsmbclient.c 2003-10-01 12:55:41.000000000 +0200 @@ -1139,8 +1139,12 @@ 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(); --- source/smbd/dosmode.c.orig 2003-06-07 19:57:39.000000000 +0200 +++ source/smbd/dosmode.c 2003-10-01 12:58:23.000000000 +0200 @@ -136,9 +136,11 @@ 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 Bye, Jojo
Applied. cvs checkin coming soon.
forgot to mark as fixed.
Hi there Ptach hasn't yet shown up in CVS, neither in Samba 3.0 nor in Samba HEAD Bye, Jojo
Really checked in this time. I found a few more instances of these two members being used unconditionally and fixed them too.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.