[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Fix conditional compilation case CONFIG_INOTIFY &&
From: |
takasi-y |
Subject: |
[Qemu-devel] [PATCH] Fix conditional compilation case CONFIG_INOTIFY && !CONFIG_INOTIFY1. |
Date: |
Sun, 28 Mar 2010 17:15:14 +0900 (JST) |
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 <address@hidden>
---
linux-user/syscall.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 9ea990d..5050e60 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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);
--
1.6.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] Fix conditional compilation case CONFIG_INOTIFY && !CONFIG_INOTIFY1.,
takasi-y <=