Bug 571440 - Android build fails on new quota check from bug 520098 (nsLocalFileUnix.cpp), r=bsmedberg
authorMatt Brubeck <mbrubeck@mozilla.com>
Fri, 11 Jun 2010 19:48:33 -0700
changeset 43535 84c15bad7d1cb2248410b1585ef99007a71ba6bb
parent 43534 06ab72f852b3e7a032de2a3c84d9536da2b0d461
child 43536 1d840cf822e6f12f926c6e714beb8d45a4a19c95
push id13756
push usermwu@mozilla.com
push dateSat, 12 Jun 2010 02:49:10 +0000
treeherdermozilla-central@84c15bad7d1c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs571440, 520098
milestone1.9.3a6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 571440 - Android build fails on new quota check from bug 520098 (nsLocalFileUnix.cpp), r=bsmedberg
configure.in
xpcom/io/nsLocalFileUnix.cpp
--- a/configure.in
+++ b/configure.in
@@ -3297,17 +3297,17 @@ AC_CHECK_HEADERS(malloc.h)
 AC_CHECK_HEADERS(X11/XKBlib.h)
 AC_CHECK_HEADERS(io.h)
 
 dnl These are all the places some variant of statfs can be hiding.
 AC_CHECK_HEADERS(sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h)
 
 dnl Quota support
 AC_CHECK_HEADERS(sys/quota.h)
-AC_CHECK_HEADERS(sys/sysmacros.h)
+AC_CHECK_HEADERS(linux/quota.h)
 
 dnl Try for MMX support
 dnl NB - later gcc versions require -mmmx for this header to be successfully
 dnl included (or another option which implies it, such as -march=pentium-mmx)
 AC_CHECK_HEADERS(mmintrin.h)
 
 dnl Check whether the compiler supports the new-style C++ standard
 dnl library headers (i.e. <new>) or needs the old "new.h"
--- a/xpcom/io/nsLocalFileUnix.cpp
+++ b/xpcom/io/nsLocalFileUnix.cpp
@@ -62,20 +62,18 @@
     #include <Path.h>
     #include <Entry.h>
     #include <Roster.h>
 #endif
 #if defined(VMS)
     #include <fabdef.h>
 #endif
 
-#if defined(HAVE_SYS_QUOTA_H)
-#if defined(HAVE_SYS_SYSMACROS_H)
-#include <sys/sysmacros.h>
-#endif
+#if defined(HAVE_SYS_QUOTA_H) && defined(HAVE_LINUX_QUOTA_H)
+#define USE_LINUX_QUOTACTL
 #include <sys/quota.h>
 #endif
 
 #include "nsDirectoryServiceDefs.h"
 #include "nsCRT.h"
 #include "nsCOMPtr.h"
 #include "nsMemory.h"
 #include "nsIFile.h"
@@ -1228,17 +1226,17 @@ nsLocalFile::GetDiskSpaceAvailable(PRInt
 
     /* 
      * The number of bytes free == The number of free blocks available to
      * a non-superuser, minus one as a fudge factor, multiplied by the size
      * of the aforementioned blocks.
      */
     *aDiskSpaceAvailable = (PRInt64)fs_buf.f_bsize * (fs_buf.f_bavail - 1);
 
-#if defined(HAVE_SYS_STAT_H) || defined(HAVE_SYS_SYSMACROS_H)
+#if defined(USE_LINUX_QUOTACTL)
 
     if(!FillStatCache()) {
         // Return available size from statfs
         return NS_OK;
     }
 
     nsCString deviceName;
     if(!GetDeviceName(major(mCachedStat.st_dev), minor(mCachedStat.st_dev), deviceName)) {