compiline error

This commit is contained in:
zsx 2018-01-23 19:51:42 +08:00
parent 6b582696c3
commit 3e998cb37a
2 changed files with 6 additions and 6 deletions

View File

@ -217,13 +217,13 @@ static int epoll_event_wait(EVENT *ev, int timeout)
ee = &ep->events[i];
fe = (FILE_EVENT *) ee->data.ptr;
#define EPOLL_ERR (EPOLLERR | EPOLLHUP)
#define EVENT_ERR (EPOLLERR | EPOLLHUP)
if (ee->events & (EPOLLIN | EPOLL_ERR) && fe && fe->r_proc) {
if (ee->events & (EPOLLIN | EVENT_ERR) && fe && fe->r_proc) {
fe->r_proc(ev, fe);
}
if (ee->events & (EPOLLOUT | EPOLL_ERR) && fe && fe->w_proc) {
if (ee->events & (EPOLLOUT | EVENT_ERR) && fe && fe->w_proc) {
fe->w_proc(ev, fe);
}
}

View File

@ -184,13 +184,13 @@ static int poll_wait(EVENT *ev, int timeout)
FILE_EVENT *fe = ep->files[i];
struct pollfd *pfd = &ep->pfds[fe->id];
#define POLL_ERR (POLLERR | POLLHUP | POLLNVAL)
#define EVENT_ERR (POLLERR | POLLHUP | POLLNVAL)
if (pfd->revents & (POLLIN | POLL_ERR) && fe->r_proc) {
if (pfd->revents & (POLLIN | EVENT_ERR) && fe->r_proc) {
fe->r_proc(ev, fe);
}
if (pfd->revents & (POLLOUT | POLL_ERR ) && fe->w_proc) {
if (pfd->revents & (POLLOUT | EVENT_ERR ) && fe->w_proc) {
fe->w_proc(ev, fe);
}
}