* [Qemu-devel] [7038] linux-user: fix problems with inotify syscalls
@ 2009-04-08 21:29 Aurelien Jarno
0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2009-04-08 21:29 UTC (permalink / raw)
To: qemu-devel
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 <froydnj@codesourcery.com>
Acked-By: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-08 21:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-08 21:29 [Qemu-devel] [7038] linux-user: fix problems with inotify syscalls Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).