1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 10:02:17 +00:00
mpv/osdep/polldev.h
NRK a61b784d90 osdep: remove erroneous POLLERR emulation
first of all, POLLERR is supposed to be ignored in `.events` and only
returned in `.revents`.

secondly select()'s exceptfds does not have a 1:1 correspondence with
POLLERR. thankfully, the only caller of this function (in terminal-unix)
never set the POLLERR flag so the errorfds were unused anyways.

so go ahead and remove it entirely instead of pretending we can emulate
something that's not possible.
2023-06-29 13:17:56 +02:00

8 lines
191 B
C

#pragma once
#include <poll.h>
// Behaves like poll(3) but works for device files on macOS.
// Only supports POLLIN and POLLOUT.
int polldev(struct pollfd fds[], nfds_t nfds, int timeout);