Fix conditional compilation case CONFIG_INOTIFY && !CONFIG_INOTIFY1.
PATCH 1/1 Fix conditional compilation case CONFIG_INOTIFY && !CONFIG_INOTIFY1.
There is undefined reference to sys_inotify_init1() at do_syscall() when CONFIG_INOTIFY=y and CONFIG_INOTIFY1=n.
We should undef TARGET_NR_inotify_init1 if CONFIG_INOTIFY1 is undefined, as it seems to be the strategy of conditional compilation here.
Signed-off-by Takashi YOSHII <[email protected]>
--- linux-user/syscall.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-)
linux-user/syscall.c +11 -9
@@ -506,22 +506,24 @@ static int sys_inotify_rm_watch(int fd, int32_t wd)return (inotify_rm_watch (fd, wd)); }#endif -#ifdef CONFIG_INOTIFY1 -#if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1) -static int sys_inotify_init1 (int flags) -{ -return (inotify_init1 (flags)); -} -#endif -#endif #else /* Userspace can usually survive runtime without inotify */ #undef TARGET_NR_inotify_init -#undef TARGET_NR_inotify_init1#undef TARGET_NR_inotify_add_watch#undef TARGET_NR_inotify_rm_watch#endif /* CONFIG_INOTIFY */ +#ifdef CONFIG_INOTIFY1 +#include <sys/inotify.h> +#if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1) +static int sys_inotify_init1 (int flags) +{ +return (inotify_init1 (flags)); +} +#endif +#else +#undef TARGET_NR_inotify_init1 +#endif /* CONFIG_INOTIFY1 */ extern int personality (int );extern int flock (int ,int );
Signature · 1 line
1.6.5