1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 +--- 1.5 + ipc/chromium/src/third_party/libevent/epoll_sub.c | 13 +++++++++++++ 1.6 + 1 file changed, 13 insertions(+) 1.7 + 1.8 +--- mozilla-central.orig/ipc/chromium/src/third_party/libevent/epoll_sub.c 1.9 ++++ mozilla-central/ipc/chromium/src/third_party/libevent/epoll_sub.c 1.10 +@@ -29,15 +29,24 @@ 1.11 + #include <sys/param.h> 1.12 + #include <sys/types.h> 1.13 + #include <sys/syscall.h> 1.14 + #include <sys/epoll.h> 1.15 + #include <unistd.h> 1.16 ++#include <errno.h> 1.17 + 1.18 + int 1.19 + epoll_create(int size) 1.20 + { 1.21 ++#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) 1.22 ++ if (size <= 0) { 1.23 ++ errno = EINVAL; 1.24 ++ return -1; 1.25 ++ } 1.26 ++ return (syscall(__NR_epoll_create1, 0)); 1.27 ++#else 1.28 + return (syscall(__NR_epoll_create, size)); 1.29 ++#endif 1.30 + } 1.31 + 1.32 + int 1.33 + epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) 1.34 + { 1.35 +@@ -46,7 +55,11 @@ epoll_ctl(int epfd, int op, int fd, stru 1.36 + } 1.37 + 1.38 + int 1.39 + epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) 1.40 + { 1.41 ++#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) 1.42 ++ return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); 1.43 ++#else 1.44 + return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); 1.45 ++#endif 1.46 + }