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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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