Morning Padraig, Pádraig Brady <[email protected]> writes:
> I'm squashing in the following to handle illumos and macOS.
> Also it decouples the code from the pollfd structure layout,
> by using C99 designated initializers.
Thanks. I read over the patches you attached and they seem reasonable.
Thanks for working on getting this merged, have a great day!
> cheers,
> Pádraig
>
> diff --git a/src/iopoll.c b/src/iopoll.c
> index 916241f89..ceb1b43ad 100644
> --- a/src/iopoll.c
> +++ b/src/iopoll.c
> @@ -49,7 +49,10 @@
> extern int
> iopoll (int fdin, int fdout)
> {
> - struct pollfd pfds[2] = {{fdin, POLLIN, 0}, {fdout, 0, 0}};
> + struct pollfd pfds[2] = { /* POLLRDBAND needed for illumos, macOS. */
> + { .fd = fdin, .events = POLLIN | POLLRDBAND, .revents = 0 },
> + { .fd = fdout, .events = POLLRDBAND, .revents = 0 },
> + };
>
> while (poll (pfds, 2, -1) > 0 || errno == EINTR)
> {
--
Arsen Arsenović
signature.asc
Description: PGP signature
