From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrfKw-0007GE-FP for qemu-devel@nongnu.org; Wed, 08 Apr 2009 17:29:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrfKu-0007Fu-Dp for qemu-devel@nongnu.org; Wed, 08 Apr 2009 17:29:33 -0400 Received: from [199.232.76.173] (port=46117 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrfKu-0007Fr-93 for qemu-devel@nongnu.org; Wed, 08 Apr 2009 17:29:32 -0400 Received: from savannah.gnu.org ([199.232.41.3]:51293 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LrfKu-00020l-00 for qemu-devel@nongnu.org; Wed, 08 Apr 2009 17:29:32 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LrfKt-0008Fd-3K for qemu-devel@nongnu.org; Wed, 08 Apr 2009 21:29:31 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LrfKs-0008FZ-PX for qemu-devel@nongnu.org; Wed, 08 Apr 2009 21:29:31 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Wed, 08 Apr 2009 21:29:30 +0000 Subject: [Qemu-devel] [7038] linux-user: fix problems with inotify syscalls Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 7038 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7038 Author: aurel32 Date: 2009-04-08 21:29:30 +0000 (Wed, 08 Apr 2009) Log Message: ----------- 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 Modified Paths: -------------- trunk/linux-user/syscall.c Modified: trunk/linux-user/syscall.c =================================================================== --- trunk/linux-user/syscall.c 2009-04-08 13:14:12 UTC (rev 7037) +++ trunk/linux-user/syscall.c 2009-04-08 21:29:30 UTC (rev 7038) @@ -6109,19 +6109,19 @@ 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;