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