[fuchsia] Add a Fuchsia compat shim for openssh's uses of select
A few parts of ssh, in particular the client and server loops, use
select() to monitor the read and write state of a small number of open
sockets. libc's select() implementation is limited to only handling 8
FDs at a time, which this code hits in common situations.
This adds a fuchsia_select shim which implements the subset of the
select() functionality used by openssh and patches the callers to
select() to call this shim instead when __Fuchsia__ is defined. The
shim does not support exceptfds at all, which isn't used, and uses a
fairly inefficient method of waiting.
Further work should move more of the state management out to the caller
so objects like the port can persist between calls instead of having to
be reallocated for each wait.
NET-701 #done
Change-Id: Iee927a25283883e52fdcb8dde568417158d0f6f3
10 files changed