vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sat May 9 14:45:09 2015 +0300| [80170ba79642dbd67ab6acf8cced2da2a7ae0620] | committer: Rémi Denis-Courmont
fixups: add missing poll() event flags > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=80170ba79642dbd67ab6acf8cced2da2a7ae0620 --- compat/poll.c | 8 ++++---- include/vlc_fixups.h | 16 ++++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/compat/poll.c b/compat/poll.c index b88f7fd..825713f 100644 --- a/compat/poll.c +++ b/compat/poll.c @@ -97,9 +97,9 @@ int (poll) (struct pollfd *fds, unsigned nfds, int timeout) return -1; } #endif - if (fds[i].events & POLLIN) + if (fds[i].events & POLLRDNORM) FD_SET (fd, rdset); - if (fds[i].events & POLLOUT) + if (fds[i].events & POLLWRNORM) FD_SET (fd, wrset); if (fds[i].events & POLLPRI) FD_SET (fd, exset); @@ -145,8 +145,8 @@ int (poll) (struct pollfd *fds, unsigned nfds, int timeout) for (unsigned i = 0; i < nfds; i++) { int fd = fds[i].fd; - fds[i].revents = (FD_ISSET (fd, rdset) ? POLLIN : 0) - | (FD_ISSET (fd, wrset) ? POLLOUT : 0) + fds[i].revents = (FD_ISSET (fd, rdset) ? POLLRDNORM : 0) + | (FD_ISSET (fd, wrset) ? POLLWRNORM : 0) | (FD_ISSET (fd, exset) ? POLLPRI : 0); } #ifdef _WIN32 diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h index ee168d7..f844641 100644 --- a/include/vlc_fixups.h +++ b/include/vlc_fixups.h @@ -273,13 +273,17 @@ const char *inet_ntop(int, const void *, char *, int); #ifndef HAVE_STRUCT_POLLFD enum { - POLLIN=1, - POLLOUT=2, - POLLPRI=4, - POLLERR=8, // unsupported stub - POLLHUP=16, // unsupported stub - POLLNVAL=32 // unsupported stub + POLLERR=0x1, + POLLHUP=0x2, + POLLNVAL=0x4, + POLLWRNORM=0x10, + POLLWRBAND=0x20, + POLLRDNORM=0x100, + POLLRDBAND=0x200, + POLLPRI=0x400, }; +#define POLLIN (POLLRDNORM|POLLRDBAND) +#define POLLOUT (POLLWRNORM|POLLWRBAND) struct pollfd { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
