3734
|
1 |
--- qbittorrent-2.8.4/src/filesystemwatcher.h.orig 2011-08-09 17:25:33.000000000 +0000
|
|
2 |
+++ qbittorrent-2.8.4/src/filesystemwatcher.h 2011-08-29 00:11:21.834669128 +0000
|
|
3 |
@@ -16,6 +16,9 @@
|
|
4 |
#include <sys/param.h>
|
|
5 |
#include <sys/mount.h>
|
|
6 |
#include <string.h>
|
|
7 |
+#elif defined (Q_OS_SOLARIS)
|
|
8 |
+#include <sys/types.h>
|
|
9 |
+#include <sys/statvfs.h>
|
|
10 |
#else
|
|
11 |
#include <sys/vfs.h>
|
|
12 |
#endif
|
|
13 |
@@ -62,11 +65,18 @@
|
|
14 |
if(!file.endsWith(QDir::separator()))
|
|
15 |
file += QDir::separator();
|
|
16 |
file += ".";
|
|
17 |
+#ifdef Q_OS_SOLARIS
|
|
18 |
+ struct statvfs buf;
|
|
19 |
+ if(!statvfs(file.toLocal8Bit().constData(), &buf)) {
|
|
20 |
+#else
|
|
21 |
struct statfs buf;
|
|
22 |
if(!statfs(file.toLocal8Bit().constData(), &buf)) {
|
|
23 |
+#endif
|
|
24 |
#ifdef Q_WS_MAC
|
|
25 |
// XXX: should we make sure HAVE_STRUCT_FSSTAT_F_FSTYPENAME is defined?
|
|
26 |
return (strcmp(buf.f_fstypename, "nfs") == 0 || strcmp(buf.f_fstypename, "cifs") == 0 || strcmp(buf.f_fstypename, "smbfs") == 0);
|
|
27 |
+#elif defined (Q_OS_SOLARIS)
|
|
28 |
+ return (buf.f_fsid == (long)CIFS_MAGIC_NUMBER || buf.f_fsid == (long)NFS_SUPER_MAGIC || buf.f_fsid == (long)SMB_SUPER_MAGIC);
|
|
29 |
#else
|
|
30 |
return (buf.f_type == (long)CIFS_MAGIC_NUMBER || buf.f_type == (long)NFS_SUPER_MAGIC || buf.f_type == (long)SMB_SUPER_MAGIC);
|
|
31 |
#endif
|