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:
Chocobo1 2021-11-02 10:41:09 +08:00 committed by GitHub
parent 5dd70b88d3
commit 7aa859a442
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View file

@ -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)