FreeBSD doesn't have statvfs64, like MacOS X.

This commit is contained in:
Mathieu Arnold 2013-10-16 15:57:59 +02:00
parent 2b652422b9
commit 1c594b6a8d

View file

@ -163,7 +163,7 @@ void Utility::setLaunchOnStartup(const QString &appName, const QString& guiName,
qint64 Utility::freeDiskSpace(const QString &path, bool *ok) qint64 Utility::freeDiskSpace(const QString &path, bool *ok)
{ {
#ifdef Q_OS_MAC #if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)
struct statvfs stat; struct statvfs stat;
statvfs(path.toUtf8().data(), &stat); statvfs(path.toUtf8().data(), &stat);
return (qint64) stat.f_bavail * stat.f_frsize; return (qint64) stat.f_bavail * stat.f_frsize;