patch-xpcom_io_nsLocalFileUnix_cpp 790 B

123456789101112131415161718192021
  1. --- mozilla-release.orig/xpcom/io/nsLocalFileUnix.cpp 2015-01-09 05:38:29.000000000 +0100
  2. +++ mozilla-release/xpcom/io/nsLocalFileUnix.cpp 2015-01-30 14:13:49.000000000 +0100
  3. @@ -1407,10 +1407,18 @@ nsLocalFile::GetDiskSpaceAvailable(int64
  4. #endif
  5. && dq.dqb_bhardlimit) {
  6. int64_t QuotaSpaceAvailable = 0;
  7. +#if defined(__UCLIBC__)
  8. + if (dq.dqb_bhardlimit > dq.dqb_curblocks) {
  9. + QuotaSpaceAvailable =
  10. + int64_t(fs_buf.F_BSIZE * (dq.dqb_bhardlimit - dq.dqb_curblocks));
  11. + }
  12. +#else
  13. if (dq.dqb_bhardlimit > dq.dqb_curspace) {
  14. QuotaSpaceAvailable =
  15. int64_t(fs_buf.F_BSIZE * (dq.dqb_bhardlimit - dq.dqb_curspace));
  16. }
  17. +#endif
  18. +
  19. if (QuotaSpaceAvailable < *aDiskSpaceAvailable) {
  20. *aDiskSpaceAvailable = QuotaSpaceAvailable;
  21. }