From: Felix Fietkau Date: Tue, 18 Jun 2013 09:11:04 +0000 (+0200) Subject: libubox: make uloop_fd::flags generic X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e386259632187196519a6717d8eaefee79eeda9a;p=oweals%2Flibubox.git libubox: make uloop_fd::flags generic Signed-off-by: Felix Fietkau --- diff --git a/uloop.c b/uloop.c index 3746520..ed7d87a 100644 --- a/uloop.c +++ b/uloop.c @@ -230,6 +230,7 @@ static int register_poll(struct uloop_fd *fd, unsigned int flags) ev.data.fd = fd->fd; ev.data.ptr = fd; + fd->flags = flags; return epoll_ctl(poll_fd, op, fd->fd, &ev); } @@ -238,6 +239,7 @@ static struct epoll_event events[ULOOP_MAX_EVENTS]; static int __uloop_fd_delete(struct uloop_fd *sock) { + sock->flags = 0; return epoll_ctl(poll_fd, EPOLL_CTL_DEL, sock->fd, 0); } diff --git a/uloop.h b/uloop.h index 975e40b..39b9b58 100644 --- a/uloop.h +++ b/uloop.h @@ -55,9 +55,7 @@ struct uloop_fd bool eof; bool error; bool registered; -#ifdef USE_KQUEUE uint8_t flags; -#endif }; struct uloop_timeout