1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-29 10:32:15 +00:00
mpv/osdep/polldev.h
Drew DeVault ba418132cd osdep: add poll shim for macOS
This implements a poll-compatible interface, backed by select on macOS,
suitable for polling on device files - which are not supported by
macOS's implementation of poll. This is a (long-standing) bug in macOS,
so hopefully we can eventually remove this shim.
2017-12-09 21:11:46 +02:00

8 lines
201 B
C

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