mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 23:17:21 -06:00
Don't use deprecated statfs64() on macOS (#15661)
Co-authored-by: Nick Korotysh <kolchaprogrammer@list.ru> Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
This commit is contained in:
@@ -347,15 +347,9 @@ bool Utils::Fs::isNetworkFileSystem(const QString &path)
|
||||
file += '/';
|
||||
file += '.';
|
||||
|
||||
#if defined(Q_OS_MACOS)
|
||||
struct statfs64 buf {};
|
||||
if (statfs64(file.toLocal8Bit().constData(), &buf) != 0)
|
||||
return false;
|
||||
#else
|
||||
struct statfs buf {};
|
||||
if (statfs(file.toLocal8Bit().constData(), &buf) != 0)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_OPENBSD)
|
||||
return ((strncmp(buf.f_fstypename, "cifs", sizeof(buf.f_fstypename)) == 0)
|
||||
|
||||
Reference in New Issue
Block a user