forked from len0rd/rockbox
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 <tchar.h>
|
||||||
#include <winioctl.h>
|
#include <winioctl.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX) || defined(Q_OS_MACX)
|
||||||
#include <sys/statvfs.h>
|
#include <sys/statvfs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ QString resolvePathCase(QString path)
|
||||||
qulonglong filesystemFree(QString path)
|
qulonglong filesystemFree(QString path)
|
||||||
{
|
{
|
||||||
qlonglong size = 0;
|
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().
|
// the usage of statfs() is deprecated by the LSB so use statvfs().
|
||||||
struct statvfs fs;
|
struct statvfs fs;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
@ -119,15 +119,6 @@ qulonglong filesystemFree(QString path)
|
||||||
if(ret == 0)
|
if(ret == 0)
|
||||||
size = fs.f_bsize * fs.f_bavail;
|
size = fs.f_bsize * fs.f_bavail;
|
||||||
#endif
|
#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)
|
#if defined(Q_OS_WIN32)
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
ULARGE_INTEGER freeAvailBytes;
|
ULARGE_INTEGER freeAvailBytes;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue