diff options
author | Dominik Wenger <domonoky@googlemail.com> | 2009-01-07 13:31:19 +0000 |
---|---|---|
committer | Dominik Wenger <domonoky@googlemail.com> | 2009-01-07 13:31:19 +0000 |
commit | 48fdf588a13b1ed572b553c80e4ae215ed310235 (patch) | |
tree | cafb904a4c1b45bc9947508fe3e5508980cdd86e /rbutil/rbutilqt/base/utils.cpp | |
parent | a68e5d835f7ea64ff4eb073ee8b38d2d41038693 (diff) |
rbutil: fix compiling on mac.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19708 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/utils.cpp')
-rw-r--r-- | rbutil/rbutilqt/base/utils.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp index 64fc18e449..379b642431 100644 --- a/rbutil/rbutilqt/base/utils.cpp +++ b/rbutil/rbutilqt/base/utils.cpp @@ -32,7 +32,7 @@ #include <tchar.h> #include <winioctl.h> #endif -#if defined(Q_OS_LINUX) +#if defined(Q_OS_LINUX) || defined(Q_OS_MACX) #include <sys/statvfs.h> #endif @@ -109,7 +109,7 @@ QString resolvePathCase(QString path) qulonglong filesystemFree(QString path) { qlonglong size = 0; -#if defined(Q_OS_LINUX) +#if defined(Q_OS_LINUX) || defined(Q_OS_MACX) // the usage of statfs() is deprecated by the LSB so use statvfs(). struct statvfs fs; int ret; @@ -119,15 +119,6 @@ qulonglong filesystemFree(QString path) if(ret == 0) size = fs.f_bsize * fs.f_bavail; #endif -#if defined(Q_OS_MACX) - struct statfs fs; - int ret; - - ret = statfs(qPrintable(path), &fs); - - if(ret == 0) - size = fs.f_bsize * fs.f_bavail; -#endif #if defined(Q_OS_WIN32) BOOL ret; ULARGE_INTEGER freeAvailBytes; |