Commit 61a70360 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Use sys/inotify.h if it exists instead of hardcoding the system calls.

parent 6a392a8a
......@@ -5740,6 +5740,7 @@ done
for ac_header in \
AudioUnit/AudioUnit.h \
Carbon/Carbon.h \
......@@ -5824,6 +5825,7 @@ for ac_header in \
sys/event.h \
sys/exec_elf.h \
sys/filio.h \
sys/inotify.h \
sys/ioctl.h \
sys/ipc.h \
sys/limits.h \
......
......@@ -347,6 +347,7 @@ AC_CHECK_HEADERS(\
sys/event.h \
sys/exec_elf.h \
sys/filio.h \
sys/inotify.h \
sys/ioctl.h \
sys/ipc.h \
sys/limits.h \
......
......@@ -828,6 +828,9 @@
/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
/* Define to 1 if you have the <sys/inotify.h> header file. */
#undef HAVE_SYS_INOTIFY_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
......
......@@ -65,7 +65,10 @@
/* inotify support */
#if defined(__linux__) && defined(__i386__)
#ifdef HAVE_SYS_INOTIFY_H
#include <sys/inotify.h>
#define USE_INOTIFY
#elif defined(__linux__) && defined(__i386__)
#define SYS_inotify_init 291
#define SYS_inotify_add_watch 292
......@@ -114,7 +117,7 @@ static inline int inotify_add_watch( int fd, const char *name, unsigned int mask
return ret;
}
static inline int inotify_remove_watch( int fd, int wd )
static inline int inotify_rm_watch( int fd, int wd )
{
int ret;
__asm__ __volatile__( "pushl %%ebx;\n\t"
......@@ -568,7 +571,7 @@ static void free_inode( struct inode *inode )
if (inode->wd != -1)
{
inotify_remove_watch( get_unix_fd( inotify_fd ), inode->wd );
inotify_rm_watch( get_unix_fd( inotify_fd ), inode->wd );
list_remove( &inode->wd_entry );
}
list_remove( &inode->ino_entry );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment