diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-09-18 03:53:14 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-09-18 03:53:14 +0000 |
commit | 926591067cd8646426ca06df0b00a1d6f6dd5752 (patch) | |
tree | 0e632c683faffdec1915cccb11f145cf278f077b /source/smbd | |
parent | 4e784b18899eddd2399a51fa7d8c219560432922 (diff) | |
download | samba-926591067cd8646426ca06df0b00a1d6f6dd5752.tar.gz samba-926591067cd8646426ca06df0b00a1d6f6dd5752.tar.xz samba-926591067cd8646426ca06df0b00a1d6f6dd5752.zip |
got rid of SMB_STRUCT_STATVFS. I don't think we should be defining
structures that only apply on some platforms.
Diffstat (limited to 'source/smbd')
-rw-r--r-- | source/smbd/dfree.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/smbd/dfree.c b/source/smbd/dfree.c index 499d0892604..c96a599e77b 100644 --- a/source/smbd/dfree.c +++ b/source/smbd/dfree.c @@ -156,10 +156,14 @@ static int fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) # 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) - SMB_STRUCT_STATVFS fsd; +#ifdef STAT_STATVFS64 + struct statvfs64 fsd; + if (statvfs64(path, &fsd) < 0) return -1; +#else + struct statvfs fsd; + if (statvfs(path, &fsd) < 0) return -1; +#endif - if (sys_statvfs (path, &fsd) < 0) - return -1; /* f_frsize isn't guaranteed to be supported. */ #endif /* STAT_STATVFS */ |