X-Git-Url: http://git.meshlink.io/?p=catta;a=blobdiff_plain;f=src%2Fcompat%2Fwindows%2Fwincompat.h;h=c736f75f938dc03868c75accbad1354239e21d37;hp=b5020226a8e5465ea406bc56105e3d61a7fdd0c9;hb=b9cafcae35680b33ba1e0d6da08a355c5b62faab;hpb=278b079946ce138ecda5f270d937476c9d3946ba diff --git a/src/compat/windows/wincompat.h b/src/compat/windows/wincompat.h index b502022..c736f75 100644 --- a/src/compat/windows/wincompat.h +++ b/src/compat/windows/wincompat.h @@ -83,6 +83,14 @@ ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags); int ioctl(int d, unsigned long request, int *p); +// Windows lacks poll, but WSAPoll is good enough for us. +#define poll(fds, nfds, timeout) WSAPoll(fds, nfds, timeout) + +// Windows lacks pipe. It has an equivalent CreatePipe but we really need +// something to give to WSAPoll, so we fake it with a local TCP socket. (ugh) +int pipe(int pipefd[2]); + + // Windows logically doesn't have uname, so we supply a replacement. struct utsname {