From e386259632187196519a6717d8eaefee79eeda9a Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 18 Jun 2013 11:11:04 +0200 Subject: [PATCH] libubox: make uloop_fd::flags generic Signed-off-by: Felix Fietkau --- uloop.c | 2 ++ uloop.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) 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