diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-10-11 15:45:00 -0700 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-02-02 16:44:15 -0800 |
commit | 5196558fde38105636032f38e9d6be6e244fa753 (patch) | |
tree | ad1c4aab6466ff379105934f33c0490917cc854b /lib | |
parent | 050767f235b7c5790975f7156be561da8abe299d (diff) | |
download | librpm-tizen-5196558fde38105636032f38e9d6be6e244fa753.tar.gz librpm-tizen-5196558fde38105636032f38e9d6be6e244fa753.tar.bz2 librpm-tizen-5196558fde38105636032f38e9d6be6e244fa753.zip |
Prefer sys/vfs.h, as statvfs stats all filesystems again
Diffstat (limited to 'lib')
-rw-r--r-- | lib/transaction.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/transaction.c b/lib/transaction.c index 9d8dbcf0a..5e43880ab 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -117,7 +117,11 @@ static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, dsi->bneeded = 0; dsi->ineeded = 0; #ifdef STATFS_HAS_F_BAVAIL +# ifdef ST_RDONLY dsi->bavail = (sfb.f_flag & ST_RDONLY) ? 0 : sfb.f_bavail; +# else + dsi->bavail = sfb.f_bavail; +# endif #else /* FIXME: the statfs struct doesn't have a member to tell how many blocks are * available for non-superusers. f_blocks - f_bfree is probably too big, but |