From 55cbf7ba340d91c473f57fe8e5deb8d082131b0a Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 9 Apr 2012 21:16:12 +0300 Subject: rely on sys/inotify.h for inotify sys/inotify.h was added to glibc 2.4 in 2006. Signed-off-by: Jeremy Allison Autobuild-User: Jeremy Allison Autobuild-Date: Fri Apr 13 21:15:00 CEST 2012 on sn-devel-104 --- source4/ntvfs/sysdep/inotify.c | 29 +---------------------------- source4/ntvfs/sysdep/wscript_configure | 11 ++--------- 2 files changed, 3 insertions(+), 37 deletions(-) (limited to 'source4/ntvfs') diff --git a/source4/ntvfs/sysdep/inotify.c b/source4/ntvfs/sysdep/inotify.c index 28ea32e8a0..d30bee2c53 100644 --- a/source4/ntvfs/sysdep/inotify.c +++ b/source4/ntvfs/sysdep/inotify.c @@ -29,36 +29,9 @@ #include "libcli/raw/smb.h" #include "param/param.h" -#if HAVE_SYS_INOTIFY_H #include -#else -/* for older glibc varients - we can remove this eventually */ -#include -#include -#ifndef HAVE_INOTIFY_INIT -/* - glibc doesn't define these functions yet (as of March 2006) -*/ -static int inotify_init(void) -{ - return syscall(__NR_inotify_init); -} - -static int inotify_add_watch(int fd, const char *path, __u32 mask) -{ - return syscall(__NR_inotify_add_watch, fd, path, mask); -} - -static int inotify_rm_watch(int fd, int wd) -{ - return syscall(__NR_inotify_rm_watch, fd, wd); -} -#endif -#endif - - -/* older glibc headers don't have these defines either */ +/* glibc < 2.5 headers don't have these defines */ #ifndef IN_ONLYDIR #define IN_ONLYDIR 0x01000000 #endif diff --git a/source4/ntvfs/sysdep/wscript_configure b/source4/ntvfs/sysdep/wscript_configure index f1e09ddd3d..aa63000499 100644 --- a/source4/ntvfs/sysdep/wscript_configure +++ b/source4/ntvfs/sysdep/wscript_configure @@ -1,16 +1,9 @@ #!/usr/bin/env python -conf.CHECK_HEADERS('linux/inotify.h asm/unistd.h sys/inotify.h', add_headers=False) +conf.CHECK_HEADERS('sys/inotify.h', add_headers=False) -conf.CHECK_FUNCS('inotify_init') - -conf.CHECK_VARIABLE('__NR_inotify_init') conf.CHECK_DECLS('F_SETLEASE', headers='linux/fcntl.h', reverse=True) conf.CHECK_DECLS('SA_SIGINFO', headers='signal.h', reverse=True) -conf.CHECK_DECLS('__NR_inotify_init', reverse=True, headers='asm/unistd.h') - -if (conf.CONFIG_SET('HAVE___NR_INOTIFY_INIT') and - (conf.CONFIG_SET('HAVE_LINUX_INOTIFY_H') or - conf.CONFIG_SET('HAVE_SYS_INOTIFY_H'))): +if (conf.CONFIG_SET('HAVE_SYS_INOTIFY_H')): conf.DEFINE('HAVE_LINUX_INOTIFY', 1) -- cgit