patch-xpcom_io_nsLocalFileUnix_cpp 837 B

12345678910111213141516
  1. --- firefox-42.0.orig/xpcom/io/nsLocalFileUnix.cpp 2015-10-29 23:18:01.000000000 +0100
  2. +++ firefox-42.0/xpcom/io/nsLocalFileUnix.cpp 2015-12-17 18:31:49.639751737 +0100
  3. @@ -1407,8 +1407,13 @@ nsLocalFile::GetDiskSpaceAvailable(int64
  4. && dq.dqb_bhardlimit) {
  5. int64_t QuotaSpaceAvailable = 0;
  6. // dqb_bhardlimit is count of BLOCK_SIZE blocks, dqb_curspace is bytes
  7. +#if defined(__UCLIBC__)
  8. + if ((BLOCK_SIZE * dq.dqb_bhardlimit) > dq.dqb_curblocks)
  9. + QuotaSpaceAvailable = int64_t(fs_buf.F_BSIZE * (dq.dqb_bhardlimit - dq.dqb_curblocks));
  10. +#else
  11. if ((BLOCK_SIZE * dq.dqb_bhardlimit) > dq.dqb_curspace)
  12. QuotaSpaceAvailable = int64_t(BLOCK_SIZE * dq.dqb_bhardlimit - dq.dqb_curspace);
  13. +#endif
  14. if (QuotaSpaceAvailable < *aDiskSpaceAvailable) {
  15. *aDiskSpaceAvailable = QuotaSpaceAvailable;
  16. }