From: Markos Chandras <markos.chand...@imgtec.com> Signed-off-by: Markos Chandras <markos.chand...@imgtec.com> --- libc/sysdeps/linux/common/epoll.c | 20 ++++++++++++++------ libc/sysdeps/linux/common/stubs.c | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c index ab3e73b..f07ab94 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 */ +#elif defined(__NR_epoll_create) +_syscall1(int, epoll_create, int, size) #endif /* diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c index 7af14c1..3b6df48 100644 --- a/libc/sysdeps/linux/common/stubs.c +++ b/libc/sysdeps/linux/common/stubs.c @@ -81,7 +81,7 @@ make_stub(create_module) make_stub(delete_module) #endif -#ifndef __NR_epoll_create +#if !defined(__NR_epoll_create) && !defined(__NR_epoll_create1) make_stub(epoll_create) #endif -- 1.8.0 _______________________________________________ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc