This is another example of the wacky world of linux - where directly calling kernel system calls from user-land processes (versus going through the any ordained APIs) is considered completely OK. In this case, libevent has decided to implement its own epoll_create() et al rather than using the libc-provided epoll_create(), which gets it into trouble on non-linux implementations.
So, illumos has implemented the *expected* APIs for features like epoll and others… however if some random piece of software tries to get too clever and strays outside of using them, well then… the only thing I can suggest is to yell at them instead :) My suggestion? Avoid configuring with epoll. event ports is much better, anyway. Since libevent’s autoconf script seems to not make this easy, you’ll have to force the issue: ac_cv_func_epoll_ctl=no ./configure … /dale > On Jul 27, 2016, at 10:22 AM, Alexander Pyhalov <a...@rsu.ru> wrote: > > Hi. > Now we have epoll() in illumos-gate. This cool, I know. But has someone tried > to build pkgsrc with epoll() enabled? > > Just one construction I've seen today in libevent (bundled with percona > server): > > int > epoll_create(int size) > { > #if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) > if (size <= 0) { > errno = EINVAL; > return -1; > } > return (syscall(__NR_epoll_create1, 0)); > #else > return (syscall(__NR_epoll_create, size)); > #endif > } > > int > epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) > { > > return (syscall(__NR_epoll_ctl, epfd, op, fd, event)); > } > > int > epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) > { > #if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) > return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, > NULL, 0)); > #else > return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); > #endif > } > > Of course, we don't have __NR_epoll_wait syscall. How many software breaks > after introducing linux interface in illumos because of assumption have > epoll() = > we are on linux? Has someone checked it? > > Has someone actually used software compiled with illumos-gate-provided > epoll() interface in large scale? > > -- > Best regards, > Alexander Pyhalov, > system administrator of Southern Federal University IT department > ------------------------------------------- illumos-discuss Archives: https://www.listbox.com/member/archive/182180/=now RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be Modify Your Subscription: https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4 Powered by Listbox: http://www.listbox.com