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