Conditionally include <sys/shm.h> based on OS support. Define missing MAP_HUGETLB...