3734
|
1 |
--- qbittorrent-2.8.4/src/misc.cpp.orig 2011-08-09 17:25:33.000000000 +0000
|
|
2 |
+++ qbittorrent-2.8.4/src/misc.cpp 2011-08-29 00:17:52.604991116 +0000
|
|
3 |
@@ -169,9 +169,15 @@
|
|
4 |
Q_ASSERT(dir_path.exists());
|
|
5 |
#ifndef Q_WS_WIN
|
|
6 |
unsigned long long available;
|
|
7 |
+#ifdef Q_OS_SOLARIS
|
|
8 |
+ struct statvfs stats;
|
|
9 |
+ const QString statfs_path = dir_path.path()+"/.";
|
|
10 |
+ const int ret = statvfs (qPrintable(statfs_path), &stats) ;
|
|
11 |
+#else
|
|
12 |
struct statfs stats;
|
|
13 |
const QString statfs_path = dir_path.path()+"/.";
|
|
14 |
const int ret = statfs (qPrintable(statfs_path), &stats) ;
|
|
15 |
+#endif
|
|
16 |
if(ret == 0) {
|
|
17 |
available = ((unsigned long long)stats.f_bavail) *
|
|
18 |
((unsigned long long)stats.f_bsize) ;
|