mirror of
https://github.com/bol-van/zapret.git
synced 2025-12-31 21:58:58 +03:00
history purge
This commit is contained in:
19
tpws/epoll-shim/src/fix.c
Normal file
19
tpws/epoll-shim/src/fix.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "fix.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
int ppoll(struct pollfd *fds, nfds_t nfds,const struct timespec *tmo_p, const sigset_t *sigmask)
|
||||
{
|
||||
// macos does not implement ppoll
|
||||
// this is a hacky ppoll shim. only for tpws which does not require sigmask
|
||||
if (sigmask)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
return poll(fds,nfds,tmo_p ? tmo_p->tv_sec*1000 + tmo_p->tv_nsec/1000000 : -1);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user