Files
haikuports/kde-frameworks/kio/patches/kio-5.39.0.patchset
Jerome Duval a9f072df15 kde-frameworks: bump to 5.39.0.
add Qt version requires.
2017-10-22 14:52:33 +02:00

100 lines
2.7 KiB
Plaintext

From af6ef92923dd1438b20ab801962b30787929d347 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Mon, 25 Sep 2017 00:56:11 +0300
Subject: Fix build on Haiku
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index a3dc3bc..ae3d12c 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -151,6 +151,10 @@ PRIVATE
KF5::DBusAddons # KDEInitInterface
)
+if (HAIKU)
+ target_link_libraries(KF5KIOCore PRIVATE network)
+endif ()
+
if(ACL_FOUND)
target_link_libraries(KF5KIOCore PRIVATE ${ACL_LIBS})
endif()
diff --git a/src/core/kmountpoint.cpp b/src/core/kmountpoint.cpp
index b7efa90..ed22c19 100644
--- a/src/core/kmountpoint.cpp
+++ b/src/core/kmountpoint.cpp
@@ -139,7 +139,7 @@ KMountPoint::~KMountPoint()
#define MOUNTTYPE(var) var->mnt_type
#define MOUNTOPTIONS(var) var->mnt_opts
#define FSNAME(var) var->mnt_fsname
-#else
+#elif !defined(__HAIKU__)
#define SETMNTENT fopen
#define ENDMNTENT fclose
#define STRUCT_MNTENT struct mnttab
@@ -414,7 +414,7 @@ KMountPoint::List KMountPoint::currentMountPoints(DetailsNeededFlags infoNeeded)
mp->d->mountPoint = QString("/");
result.append(mp);
-#else
+#elif !defined(__HAIKU__)
STRUCT_SETMNTENT mnttab;
if ((mnttab = SETMNTENT(MNTTAB, "r")) == nullptr) {
return result;
diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp
index 3c1b992..b89fec7 100644
--- a/src/ioslaves/file/file_unix.cpp
+++ b/src/ioslaves/file/file_unix.cpp
@@ -48,6 +48,8 @@
#include <sys/sendfile.h>
#endif
+#undef HAVE_DIRENT_D_TYPE
+
using namespace KIO;
#define MAX_IPC_SIZE (1024*32)
diff --git a/src/kpac/CMakeLists.txt b/src/kpac/CMakeLists.txt
index aebe1eb..e7755f3 100644
--- a/src/kpac/CMakeLists.txt
+++ b/src/kpac/CMakeLists.txt
@@ -48,6 +48,9 @@ if (Qt5Script_FOUND)
if (HAVE_RESOLV_LIBRARY)
target_link_libraries(kded_proxyscout resolv)
endif ()
+ if (HAIKU)
+ target_link_libraries(kded_proxyscout network)
+ endif ()
endif()
set_package_properties(Qt5Script PROPERTIES DESCRIPTION "QtScript, one of the Qt5 modules"
@@ -69,6 +72,10 @@ if (HAVE_SOCKET_LIBRARY)
target_link_libraries(kpac_dhcp_helper socket)
endif ()
+if (HAIKU)
+ target_link_libraries(kpac_dhcp_helper network)
+endif ()
+
install(TARGETS kpac_dhcp_helper DESTINATION ${KDE_INSTALL_LIBEXECDIR_KF5} )
########### install files ###############
diff --git a/src/widgets/previewjob.cpp b/src/widgets/previewjob.cpp
index da50b21..d0b3c5e 100644
--- a/src/widgets/previewjob.cpp
+++ b/src/widgets/previewjob.cpp
@@ -22,6 +22,10 @@
#include "previewjob.h"
+#ifdef Q_OS_HAIKU
+#undef Q_OS_UNIX // We don't have sys/shm.h
+#endif
+
#ifdef Q_OS_UNIX
#include <sys/ipc.h>
#include <sys/shm.h>
--
2.13.1