Require `fcntl.h`, as it's required on Solaris
wip: do not use MSG_NOSIGNAL when it's not defined
Fix ambiguous references to `map`