Commit 13bb302b authored by Fabian Vogt's avatar Fabian Vogt

Merge branch 'fix-freebsd' into 'master'

Make kio-fuse compile on FreeBSD (clone of !3, rebased)

See merge request kde/kio-fuse!14
parents 3155bde7 6d031812
......@@ -55,6 +55,7 @@ ecm_qt_declare_logging_category(KIOFUSE_SOURCES
add_executable(kio-fuse ${KIOFUSE_SOURCES})
target_include_directories(kio-fuse PRIVATE ${FUSE3_INCLUDE_DIRS})
target_compile_definitions(kio-fuse PRIVATE FUSE_USE_VERSION=31 ${FUSE3_CFLAGS_OTHER})
target_link_options(kio-fuse PRIVATE ${FUSE3_LDFLAGS})
target_link_libraries(kio-fuse PRIVATE Qt5::Core KF5::KIOCore ${FUSE3_LIBRARIES})
install(TARGETS kio-fuse DESTINATION ${KDE_INSTALL_FULL_LIBEXECDIR})
install(FILES kio-fuse-tmpfiles.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d)
......
......@@ -18,19 +18,22 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/fs.h>
#include <qglobal.h>
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
#include <QDateTime>
#include <QDebug>
#include <QVersionNumber>
#ifdef Q_OS_LINUX
#include <linux/fs.h>
#include <sys/utsname.h>
#endif
#include <QDateTime>
#include <QDebug>
#include <QVersionNumber>
#include <KIO/ListJob>
#include <KIO/MkdirJob>
#include <KIO/StatJob>
......@@ -40,6 +43,15 @@
#include "debug.h"
#include "kiofusevfs.h"
// Flags that don't exist on FreeBSD; since these are used as
// bit(masks), setting them to 0 effectively means they're always unset.
#ifndef O_NOATIME
#define O_NOATIME 0
#endif
#ifndef RENAME_NOREPLACE
#define RENAME_NOREPLACE 0
#endif
// The libfuse macros make this necessary
#pragma GCC diagnostic ignored "-Wpedantic"
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment