libsoup3: update to 3.6.0; fix GTK2/3 app startup
[oi-userland.git] / components / network / qbittorrent / patches / 01-fs.cpp.patch
blobdb161e92478872eb0538af19019537b81e04c163
1 diff -Nru qbittorrent-4.5.0.orig/src/base/utils/fs.cpp qbittorrent-4.5.0/src/base/utils/fs.cpp
2 --- qbittorrent-4.5.0.orig/src/base/utils/fs.cpp 2022-11-26 22:16:23.000000000 +0000
3 +++ qbittorrent-4.5.0/src/base/utils/fs.cpp 2023-01-13 17:43:51.175007800 +0000
4 @@ -239,14 +239,18 @@
5 return (::GetDriveTypeW(volumePath.get()) == DRIVE_REMOTE);
6 #else
7 const QString file = (path.toString() + u"/.");
8 - struct statfs buf {};
9 - if (statfs(file.toLocal8Bit().constData(), &buf) != 0)
10 + struct statvfs buf {};
11 + if (statvfs(file.toLocal8Bit().constData(), &buf) != 0)
12 return false;
14 #if defined(Q_OS_OPENBSD)
15 return ((strncmp(buf.f_fstypename, "cifs", sizeof(buf.f_fstypename)) == 0)
16 || (strncmp(buf.f_fstypename, "nfs", sizeof(buf.f_fstypename)) == 0)
17 || (strncmp(buf.f_fstypename, "smbfs", sizeof(buf.f_fstypename)) == 0));
18 +#elif defined(Q_OS_SOLARIS)
19 + return ((strncmp(buf.f_basetype, "cifs", sizeof(buf.f_basetype)) == 0)
20 + || (strncmp(buf.f_basetype, "nfs", sizeof(buf.f_basetype)) == 0)
21 + || (strncmp(buf.f_basetype, "smbfs", sizeof(buf.f_basetype)) == 0));
22 #else
23 // Magic number reference:
24 // https://github.com/coreutils/coreutils/blob/master/src/stat.c