The declaration of Libc.pselect is wrong: the
__timeout argument should have type ptimespec, not
ptimeval:
function pselect(__nfds: Integer; __readfds,
__writefds, __exceptfds: PFDSet;
__timeout: Ptimespec = nil; __sigmask: PSigSet =
nil): Integer; cdecl;