summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Orgis2009-02-21 09:53:46 +0100
committerThomas Orgis2009-02-21 09:53:46 +0100
commit3a9c7d8d0eee7095a9a631ab3012b03aaee14a9f (patch)
tree6b4add3a2df167eb09eb57be9c532cd9c4ca48c7
parent4704ebc2f185cfe7982abb843e760ad96bf1cbac (diff)
kdepim: fix build (inotify header mess)
-rw-r--r--kde-core/kdepim/HISTORY3
-rwxr-xr-xkde-core/kdepim/PRE_BUILD3
-rw-r--r--kde-core/kdepim/inotify.patch37
3 files changed, 43 insertions, 0 deletions
diff --git a/kde-core/kdepim/HISTORY b/kde-core/kdepim/HISTORY
index bfad40d7d7..6d79d5ccb1 100644
--- a/kde-core/kdepim/HISTORY
+++ b/kde-core/kdepim/HISTORY
@@ -1,3 +1,6 @@
+2009-02-18 Thomas Orgis <sobukus@sourcemage.org>
+ * PRE_BUILD, inotify.patch: fix build; bad kernel header usage
+
2008-08-26 Jaka Kranjc <lynxlynxlynx@sourcemage.org>
* DETAILS: updated spell to 3.5.10
diff --git a/kde-core/kdepim/PRE_BUILD b/kde-core/kdepim/PRE_BUILD
new file mode 100755
index 0000000000..b371357e5a
--- /dev/null
+++ b/kde-core/kdepim/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+patch -Np1 < "$SCRIPT_DIRECTORY/inotify.patch"
diff --git a/kde-core/kdepim/inotify.patch b/kde-core/kdepim/inotify.patch
new file mode 100644
index 0000000000..a199e6c483
--- /dev/null
+++ b/kde-core/kdepim/inotify.patch
@@ -0,0 +1,37 @@
+diff -ru kdepim-3.5.10/kmail/editorwatcher.cpp kdepim-3.5.10.inotify/kmail/editorwatcher.cpp
+--- kdepim-3.5.10/kmail/editorwatcher.cpp 2008-02-13 10:39:37.000000000 +0100
++++ kdepim-3.5.10.inotify/kmail/editorwatcher.cpp 2009-02-18 15:18:49.000000000 +0100
+@@ -32,30 +32,14 @@
+ #include <cassert>
+
+ // inotify stuff taken from kdelibs/kio/kio/kdirwatch.cpp
++// fixed for linux header usage
+ #ifdef HAVE_INOTIFY
+ #include <sys/ioctl.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/syscall.h>
+-#include <linux/types.h>
+-// Linux kernel headers are documented to not compile
+-#define _S390_BITOPS_H
+-#include <linux/inotify.h>
+-
+-static inline int inotify_init (void)
+-{
+- return syscall (__NR_inotify_init);
+-}
+-
+-static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
+-{
+- return syscall (__NR_inotify_add_watch, fd, name, mask);
+-}
+-
+-static inline int inotify_rm_watch (int fd, __u32 wd)
+-{
+- return syscall (__NR_inotify_rm_watch, fd, wd);
+-}
++#include <sys/types.h>
++#include <sys/inotify.h>
+ #endif
+
+ using namespace KMail;