Try to degrade gracefully if inotify is unavailable

db4
slava 2008-04-21 17:50:40 -05:00
parent 3e3397ccb9
commit 3b5afee8db
1 changed files with 24 additions and 0 deletions

View File

@ -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