ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 ---
     2  ipc/chromium/src/third_party/libevent/epoll_sub.c |   13 +++++++++++++
     3  1 file changed, 13 insertions(+)
     5 --- mozilla-central.orig/ipc/chromium/src/third_party/libevent/epoll_sub.c
     6 +++ mozilla-central/ipc/chromium/src/third_party/libevent/epoll_sub.c
     7 @@ -29,15 +29,24 @@
     8  #include <sys/param.h>
     9  #include <sys/types.h>
    10  #include <sys/syscall.h>
    11  #include <sys/epoll.h>
    12  #include <unistd.h>
    13 +#include <errno.h>
    15  int
    16  epoll_create(int size)
    17  {
    18 +#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1)
    19 +	if (size <= 0) {
    20 +		errno = EINVAL;
    21 +		return -1;
    22 +	}
    23 +	return (syscall(__NR_epoll_create1, 0));
    24 +#else
    25  	return (syscall(__NR_epoll_create, size));
    26 +#endif
    27  }
    29  int
    30  epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
    31  {
    32 @@ -46,7 +55,11 @@ epoll_ctl(int epfd, int op, int fd, stru
    33  }
    35  int
    36  epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
    37  {
    38 +#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait)
    39 +	return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0));
    40 +#else
    41  	return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout));
    42 +#endif
    43  }

mercurial