From kde-commits Mon Sep 08 20:32:46 2008 From: Dirk Mueller Date: Mon, 08 Sep 2008 20:32:46 +0000 To: kde-commits Subject: branches/KDE/3.5/kdelibs/kio/kio Message-Id: <1220905966.741558.1391.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122090637127191 SVN commit 858854 by mueller: prefer the glibc header of inotify support over the linux header, as the latter is broken with newer kernels M +20 -1 configure.in.in M +4 -2 kdirwatch.cpp --- branches/KDE/3.5/kdelibs/kio/kio/configure.in.in #858853:858854 @@ -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 + ], + [ +#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) --- branches/KDE/3.5/kdelibs/kio/kio/kdirwatch.cpp #858853:858854 @@ -64,11 +64,13 @@ // debug #include -#ifdef HAVE_INOTIFY +#ifdef HAVE_SYS_INOTIFY +#include +#include +#elif HAVE_INOTIFY #include #include #include -#include // Linux kernel headers are documented to not compile #define _S390_BITOPS_H #include