Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | --- |
michael@0 | 2 | ipc/chromium/src/third_party/libevent/epoll_sub.c | 13 +++++++++++++ |
michael@0 | 3 | 1 file changed, 13 insertions(+) |
michael@0 | 4 | |
michael@0 | 5 | --- mozilla-central.orig/ipc/chromium/src/third_party/libevent/epoll_sub.c |
michael@0 | 6 | +++ mozilla-central/ipc/chromium/src/third_party/libevent/epoll_sub.c |
michael@0 | 7 | @@ -29,15 +29,24 @@ |
michael@0 | 8 | #include <sys/param.h> |
michael@0 | 9 | #include <sys/types.h> |
michael@0 | 10 | #include <sys/syscall.h> |
michael@0 | 11 | #include <sys/epoll.h> |
michael@0 | 12 | #include <unistd.h> |
michael@0 | 13 | +#include <errno.h> |
michael@0 | 14 | |
michael@0 | 15 | int |
michael@0 | 16 | epoll_create(int size) |
michael@0 | 17 | { |
michael@0 | 18 | +#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) |
michael@0 | 19 | + if (size <= 0) { |
michael@0 | 20 | + errno = EINVAL; |
michael@0 | 21 | + return -1; |
michael@0 | 22 | + } |
michael@0 | 23 | + return (syscall(__NR_epoll_create1, 0)); |
michael@0 | 24 | +#else |
michael@0 | 25 | return (syscall(__NR_epoll_create, size)); |
michael@0 | 26 | +#endif |
michael@0 | 27 | } |
michael@0 | 28 | |
michael@0 | 29 | int |
michael@0 | 30 | epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) |
michael@0 | 31 | { |
michael@0 | 32 | @@ -46,7 +55,11 @@ epoll_ctl(int epfd, int op, int fd, stru |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | int |
michael@0 | 36 | epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) |
michael@0 | 37 | { |
michael@0 | 38 | +#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) |
michael@0 | 39 | + return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); |
michael@0 | 40 | +#else |
michael@0 | 41 | return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); |
michael@0 | 42 | +#endif |
michael@0 | 43 | } |