From: Markos Chandras <[email protected]>
Signed-off-by: Markos Chandras <[email protected]>
---
libc/sysdeps/linux/common/inotify.c | 14 ++++++++++----
libc/sysdeps/linux/common/stubs.c | 3 ++-
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/libc/sysdeps/linux/common/inotify.c
b/libc/sysdeps/linux/common/inotify.c
index e2f3836..8f5aa25 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);
+}
+
+#elif defined(__NR_intofity_init)
+_syscall0(int, inotify_init)
#endif
#ifdef __NR_inotify_add_watch
diff --git a/libc/sysdeps/linux/common/stubs.c
b/libc/sysdeps/linux/common/stubs.c
index e96e458..b7e0357 100644
--- a/libc/sysdeps/linux/common/stubs.c
+++ b/libc/sysdeps/linux/common/stubs.c
@@ -157,7 +157,8 @@ make_stub(getxattr)
make_stub(init_module)
#endif
-#if !defined __NR_inotify_init && defined __UCLIBC_LINUX_SPECIFIC__
+#if !defined __NR_inotify_init && !defined(__NR_inotify_init1) \
+ && defined __UCLIBC_LINUX_SPECIFIC__
make_stub(inotify_init)
#endif
--
1.8.0
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc