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