diff -Naur kdelibs-3.5.8.orig/kio/kio/configure.in.in kdelibs-3.5.8/kio/kio/configure.in.in
--- kdelibs-3.5.8.orig/kio/kio/configure.in.in	2007-10-08 16:01:42.000000000 +0200
+++ kdelibs-3.5.8/kio/kio/configure.in.in	2007-11-20 12:15:11.000000000 +0100
@@ -130,9 +130,6 @@
 #ifndef IN_ALL_EVENTS
 #error no inotify notification
 #endif
-#ifndef __NR_inotify_init
-#error no __NR_inotify_init
-#endif
 
   ],kde_cv_have_inotify=yes,kde_cv_have_inotify=no)
 
diff -Naur kdelibs-3.5.8.orig/kio/kio/kdirwatch.cpp kdelibs-3.5.8/kio/kio/kdirwatch.cpp
--- kdelibs-3.5.8.orig/kio/kio/kdirwatch.cpp	2007-10-08 16:01:42.000000000 +0200
+++ kdelibs-3.5.8/kio/kio/kdirwatch.cpp	2007-11-20 12:15:11.000000000 +0100
@@ -73,6 +73,24 @@
 #define _S390_BITOPS_H
 #include <linux/inotify.h>
 
+#ifndef __NR_inotify_init
+#if defined(__i386__)
+#define __NR_inotify_init       291
+#define __NR_inotify_add_watch  292
+#define __NR_inotify_rm_watch   293
+#endif
+#if defined(__PPC__)
+#define __NR_inotify_init       275
+#define __NR_inotify_add_watch  276
+#define __NR_inotify_rm_watch   277
+#endif
+#if defined(__x86_64__)
+#define __NR_inotify_init       253
+#define __NR_inotify_add_watch  254
+#define __NR_inotify_rm_watch   255
+#endif
+#endif
+
 static inline int inotify_init (void)
 {
   return syscall (__NR_inotify_init);
