From dbfe4c3611a613df1f87b3d6a53063f7988ae5f7 Mon Sep 17 00:00:00 2001 From: aurel32 Date: Wed, 8 Apr 2009 21:29:30 +0000 Subject: [PATCH] linux-user: fix problems with inotify syscalls The sys_inotify* calls are defined if the target supports them and the host supports the necessary syscalls. But the syscalls are handled if the target supports them. This situation leads to compilation failures when the host doesn't support the necessary syscalls, as the linker will complain about undefined functions. Fix this state of affairs by making the handling conditions the same as the call definition conditions. Signed-off-by: Nathan Froyd Acked-By: Riku Voipio Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7038 c046a42c-6fe2-441c-8c8c-71466251a162 --- linux-user/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 226ee6ca6e..8608171d54 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6109,19 +6109,19 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, ret = do_futex(arg1, arg2, arg3, arg4, arg5, arg6); break; #endif -#ifdef TARGET_NR_inotify_init +#if defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init) case TARGET_NR_inotify_init: ret = get_errno(sys_inotify_init()); break; #endif -#ifdef TARGET_NR_inotify_add_watch +#if defined(TARGET_NR_inotify_add_watch) && defined(__NR_inotify_add_watch) case TARGET_NR_inotify_add_watch: p = lock_user_string(arg2); ret = get_errno(sys_inotify_add_watch(arg1, path(p), arg3)); unlock_user(p, arg2, 0); break; #endif -#ifdef TARGET_NR_inotify_rm_watch +#if defined(TARGET_NR_inotify_rm_watch) && defined(__NR_inotify_rm_watch) case TARGET_NR_inotify_rm_watch: ret = get_errno(sys_inotify_rm_watch(arg1, arg2)); break;