From: Markos Chandras <[email protected]>
Signed-off-by: Markos Chandras <[email protected]>
---
libc/sysdeps/linux/common/inotify.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/libc/sysdeps/linux/common/inotify.c
b/libc/sysdeps/linux/common/inotify.c
index e2f3836..972896d 100644
--- a/libc/sysdeps/linux/common/inotify.c
+++ b/libc/sysdeps/linux/common/inotify.c
@@ -11,12 +11,18 @@
#include <sys/syscall.h>
#include <sys/inotify.h>
-#ifdef __NR_inotify_init
-_syscall0(int, inotify_init)
+#if defined(__NR_inotify_init1)
+_syscall1(int, inotify_init1, int, flags)
#endif
-#ifdef __NR_inotify_init1
-_syscall1(int, inotify_init1, int, flags)
+#if defined(__NR_inotify_init1) && ! defined(__NR_inotify_init)
+int inotify_init(void)
+{
+ return INLINE_SYSCALL(inotify_init1, 1, 0);
+}
+
+#else
+_syscall0(int, inotify_init)
#endif
#ifdef __NR_inotify_add_watch
--
1.7.1
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc