From 3b5afee8dbc616b668af01625a3de2a79322acb1 Mon Sep 17 00:00:00 2001 From: slava Date: Mon, 21 Apr 2008 17:50:40 -0500 Subject: [PATCH] Try to degrade gracefully if inotify is unavailable --- vm/os-linux.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/vm/os-linux.c b/vm/os-linux.c index 935add6714..91017fc3f8 100644 --- a/vm/os-linux.c +++ b/vm/os-linux.c @@ -18,6 +18,8 @@ const char *vm_executable_path(void) } } +#ifdef SYS_inotify_init + int inotify_init(void) { return syscall(SYS_inotify_init); @@ -32,3 +34,25 @@ int inotify_rm_watch(int fd, u32 wd) { return syscall(SYS_inotify_rm_watch, fd, wd); } + +#else + +int inotify_init(void) +{ + not_implemented_error(); + return -1; +} + +int inotify_add_watch(int fd, const char *name, u32 mask) +{ + not_implemented_error(); + return -1; +} + +int inotify_rm_watch(int fd, u32 wd) +{ + not_implemented_error(); + return -1; +} + +#endif