uloop: add support for integrating with a different event loop
[project/libubox.git] / uloop-epoll.c
index bb652fd3444aebc0a916cb411a915c482df02826..70e45e448e738632acd425e3f567a117b9feafbf 100644 (file)
@@ -23,7 +23,7 @@
 #define EPOLLRDHUP 0x2000
 #endif
 
-int uloop_init(void)
+static int uloop_init_pollfd(void)
 {
        if (poll_fd >= 0)
                return 0;
@@ -52,9 +52,7 @@ static int register_poll(struct uloop_fd *fd, unsigned int flags)
        if (flags & ULOOP_EDGE_TRIGGER)
                ev.events |= EPOLLET;
 
-       ev.data.fd = fd->fd;
        ev.data.ptr = fd;
-       fd->flags = flags;
 
        return epoll_ctl(poll_fd, op, fd->fd, &ev);
 }