summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/utils.cpp')
-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;