mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
rbutil: fix compiling on mac.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19708 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a68e5d835f
commit
48fdf588a1
1 changed files with 2 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue