Bug 520098 - Darwin build fails on new quota check from bug 72892 (nsLocalFileUnix.cpp). r=bsmedberg
authorHanspeter Niederstrasser <niederstrasser@gmail.com>
Thu, 01 Oct 2009 18:07:00 -0400
changeset 43453 f9aceff48e1bbd8a0efb0ee3a06aadbb477e879a
parent 43452 99271495668e32d612220b4edd018bf65c2ca245
child 43454 984f89cada7c09e1bf7f4772e045c965f3141589
push id13715
push userCallek@gmail.com
push dateThu, 10 Jun 2010 06:01:34 +0000
treeherdermozilla-central@68ec1fa60b86 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs520098, 72892
milestone1.9.3a5pre
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 520098 - Darwin build fails on new quota check from bug 72892 (nsLocalFileUnix.cpp). r=bsmedberg
configure.in
xpcom/io/nsLocalFileUnix.cpp
--- a/configure.in
+++ b/configure.in
@@ -3297,16 +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)
 
 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
@@ -63,17 +63,19 @@
     #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
 #include <sys/quota.h>
 #endif
 
 #include "nsDirectoryServiceDefs.h"
 #include "nsCRT.h"
 #include "nsCOMPtr.h"
 #include "nsMemory.h"
 #include "nsIFile.h"
@@ -1226,17 +1228,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_QUOTA_H)
+#if defined(HAVE_SYS_STAT_H) || defined(HAVE_SYS_SYSMACROS_H)
 
     if(!FillStatCache()) {
         // Return available size from statfs
         return NS_OK;
     }
 
     nsCString deviceName;
     if(!GetDeviceName(major(mCachedStat.st_dev), minor(mCachedStat.st_dev), deviceName)) {