Index: kdelibs-3.5.10/kio/kio/configure.in.in =================================================================== --- kdelibs-3.5.10/kio/kio/configure.in.in +++ kdelibs-3.5.10/kio/kio/configure.in.in 2008-09-28 14:33:08.000000000 +0300 @@ -136,11 +136,30 @@ ],kde_cv_have_inotify=yes,kde_cv_have_inotify=no) + AC_CACHE_VAL(kde_cv_have_sys_inotify, + [ + kde_cv_have_sys_inotify=no + AC_LANG_SAVE + AC_LANG_C + + AC_TRY_COMPILE( + [ +#include <sys/inotify.h> + ], + [ +#ifndef IN_ALL_EVENTS +#error no inotify notification +#endif + ],kde_cv_have_sys_inotify=yes,kde_cv_have_sys_inotify=no) + AC_LANG_RESTORE ]) - if test "$kde_cv_have_inotify" = "yes" ; then + if test "$kde_cv_have_inotify" = "yes" -o "$kde_cv_have_sys_inotify" = "yes"; then AC_DEFINE_UNQUOTED(HAVE_INOTIFY, 1, [Define if your system has Linux Inode Notification]) + if test "$kde_cv_have_sys_inotify" = "yes"; then + AC_DEFINE_UNQUOTED(HAVE_SYS_INOTIFY, 1, [Define if your system has glibc support for inotify]) + fi AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) Index: kdelibs-3.5.10/kio/kio/kdirwatch.cpp =================================================================== --- kdelibs-3.5.10/kio/kio/kdirwatch.cpp +++ kdelibs-3.5.10/kio/kio/kdirwatch.cpp 2008-09-28 14:33:24.000000000 +0300 @@ -64,11 +64,13 @@ // debug #include <sys/ioctl.h> -#ifdef HAVE_INOTIFY +#ifdef HAVE_SYS_INOTIFY +#include <sys/inotify.h> +#include <fcntl.h> +#elif HAVE_INOTIFY #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> @@ -87,7 +89,9 @@ { return syscall (__NR_inotify_rm_watch, fd, wd); } +#endif +#ifdef HAVE_INOTIFY #ifndef IN_ONLYDIR #define IN_ONLYDIR 0x01000000 #endif @@ -99,7 +103,6 @@ #ifndef IN_MOVE_SELF #define IN_MOVE_SELF 0x00000800 #endif - #endif #include <sys/utsname.h>