diff options
Diffstat (limited to 'kio/kio/kdirwatch.cpp')
-rw-r--r-- | kio/kio/kdirwatch.cpp | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/kio/kio/kdirwatch.cpp b/kio/kio/kdirwatch.cpp index b80a23473..aaa807ed6 100644 --- a/kio/kio/kdirwatch.cpp +++ b/kio/kio/kdirwatch.cpp @@ -64,36 +64,17 @@ // debug #include <sys/ioctl.h> -#ifdef HAVE_SYS_INOTIFY -#include <sys/inotify.h> -#include <fcntl.h> -#elif HAVE_INOTIFY +#ifdef 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> - -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); -} -#endif +#include <sys/inotify.h> -#ifdef HAVE_INOTIFY #ifndef IN_ONLYDIR -#define IN_ONLYDIR 0x01000000 +#define IN_ONLYDIR 0x01000000 #endif #ifndef IN_DONT_FOLLOW @@ -103,6 +84,7 @@ static inline int inotify_rm_watch (int fd, __u32 wd) #ifndef IN_MOVE_SELF #define IN_MOVE_SELF 0x00000800 #endif + #endif #include <sys/utsname.h> |