summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorZach Loafman <zachary.loafman@isilon.com>2008-07-03 11:52:53 -0700
committerVolker Lendecke <vl@samba.org>2008-07-22 15:00:48 +0200
commit472519eb6941bc0972212cc416ab89801fe3ee0c (patch)
tree219bd63d7e367b5b54c8e09b02a349594306f84c /source3/lib
parentabaa69b32b212f151832b5e5c9325bfeea7d0bb2 (diff)
downloadsamba-472519eb6941bc0972212cc416ab89801fe3ee0c.tar.gz
samba-472519eb6941bc0972212cc416ab89801fe3ee0c.tar.bz2
samba-472519eb6941bc0972212cc416ab89801fe3ee0c.zip
Check for f_frsize when using statvfs
Add a configure test for the availability of f_frsize in struct statvfs (for broken platforms that define statvfs but still have f_bsize/f_iosize). Also add sys/types.h to the other struct statvfs test (again, some platforms need it). (This used to be commit 591bf1d15ff3b93db908cc3a4b6e10d09e5b74b6)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/fsusage.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/fsusage.c b/source3/lib/fsusage.c
index c5dec5ee8d..66ffb9f442 100644
--- a/source3/lib/fsusage.c
+++ b/source3/lib/fsusage.c
@@ -122,8 +122,13 @@ int sys_fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
#endif /* STAT_STATFS4 */
#if defined(STAT_STATVFS) || defined(STAT_STATVFS64) /* SVR4 */
+#if defined HAVE_FRSIZE
# define CONVERT_BLOCKS(B) \
adjust_blocks ((SMB_BIG_UINT)(B), fsd.f_frsize ? (SMB_BIG_UINT)fsd.f_frsize : (SMB_BIG_UINT)fsd.f_bsize, (SMB_BIG_UINT)512)
+#else
+# define CONVERT_BLOCKS(B) \
+ adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)fsd.f_bsize, (SMB_BIG_UINT)512)
+#endif
#ifdef STAT_STATVFS64
struct statvfs64 fsd;