Browse Source

Merge pull request #9408 from FlingeR/patch-openbsd

Support the OpenBSD filesystem
adaptive-webui-19844
sledgehammer999 6 years ago committed by GitHub
parent
commit
6f04754a63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/base/filesystemwatcher.cpp
  2. 4
      src/base/utils/fs.cpp

2
src/base/filesystemwatcher.cpp

@ -30,7 +30,7 @@
#include <QtGlobal> #include <QtGlobal>
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) #if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
#include <cstring> #include <cstring>
#include <sys/mount.h> #include <sys/mount.h>
#include <sys/param.h> #include <sys/param.h>

4
src/base/utils/fs.cpp

@ -44,7 +44,7 @@
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
#include <Windows.h> #include <Windows.h>
#elif defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) #elif defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
#include <sys/param.h> #include <sys/param.h>
#include <sys/mount.h> #include <sys/mount.h>
#elif defined(Q_OS_HAIKU) #elif defined(Q_OS_HAIKU)
@ -313,7 +313,7 @@ bool Utils::Fs::isNetworkFileSystem(const QString &path)
if (statfs(file.toLocal8Bit().constData(), &buf) != 0) if (statfs(file.toLocal8Bit().constData(), &buf) != 0)
return false; return false;
#ifdef Q_OS_MAC #if defined(Q_OS_MAC) || defined(Q_OS_OPENBSD)
// XXX: should we make sure HAVE_STRUCT_FSSTAT_F_FSTYPENAME is defined? // XXX: should we make sure HAVE_STRUCT_FSSTAT_F_FSTYPENAME is defined?
return ((strncmp(buf.f_fstypename, "nfs", sizeof(buf.f_fstypename)) == 0) return ((strncmp(buf.f_fstypename, "nfs", sizeof(buf.f_fstypename)) == 0)
|| (strncmp(buf.f_fstypename, "cifs", sizeof(buf.f_fstypename)) == 0) || (strncmp(buf.f_fstypename, "cifs", sizeof(buf.f_fstypename)) == 0)

Loading…
Cancel
Save