From: Markos Chandras <markos.chand...@imgtec.com>

Signed-off-by: Markos Chandras <markos.chand...@imgtec.com>
---
 libc/sysdeps/linux/common/epoll.c |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/libc/sysdeps/linux/common/epoll.c 
b/libc/sysdeps/linux/common/epoll.c
index ab3e73b..36cda92 100644
--- a/libc/sysdeps/linux/common/epoll.c
+++ b/libc/sysdeps/linux/common/epoll.c
@@ -16,17 +16,25 @@
 #endif
 
 /*
- * epoll_create()
+ * epoll_create1()
  */
-#ifdef __NR_epoll_create
-_syscall1(int, epoll_create, int, size)
+#if defined(__NR_epoll_create1)
+_syscall1(int, epoll_create1, int, flags)
 #endif
 
+#if defined(__NR_epoll_create1) && ! defined(__NR_epoll_create)
+int epoll_create(int size)
+{
+       return INLINE_SYSCALL(epoll_create1, 1, 0);
+}
+
 /*
- * epoll_create1()
+ * epoll_create()
  */
-#ifdef __NR_epoll_create1
-_syscall1(int, epoll_create1, int, flags)
+
+/* For systems that have both, prefer the old one */
+#else
+_syscall1(int, epoll_create, int, size)
 #endif
 
 /*
-- 
1.7.1


_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to