Some missing bits of POSIX for macOS.
