Fix the build.
added msync, madvise, and requisite constants for macos and linux
Use braces for macros which require them.