+#ifdef __NetBSD__
if (pollfd[i].revents & !(pollfd[i].revents & POLLNVAL))
+#else if (pollfd[i].revents) +#endif
I would hate to see this kind of __NetBSD__ pollution of Wine. (I believe something like it slipped through recently -- not good.)
It used to be that documentation/porting contained lots of reasons why mentioning any OS name in places like this is a bad idea.
I suggest a suitable configure test or a porting wrapper for poll.
Morten