summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2009-01-07 13:31:19 +0000
committerDominik Wenger <domonoky@googlemail.com>2009-01-07 13:31:19 +0000
commit48fdf588a13b1ed572b553c80e4ae215ed310235 (patch)
treecafb904a4c1b45bc9947508fe3e5508980cdd86e /rbutil
parenta68e5d835f7ea64ff4eb073ee8b38d2d41038693 (diff)
downloadrockbox-48fdf588a13b1ed572b553c80e4ae215ed310235.tar.gz
rockbox-48fdf588a13b1ed572b553c80e4ae215ed310235.tar.bz2
rockbox-48fdf588a13b1ed572b553c80e4ae215ed310235.zip
rbutil: fix compiling on mac.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19708 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/base/utils.cpp13
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;