[Xray] Fix allocator build, MAP_NORESERVE flag is not always supported
MAP_NORESERVE is not supported or a no-op on BSD.
Reviewers: dberris
#include "sanitizer_common/sanitizer_internal_defs.h"
#include "sanitizer_common/sanitizer_mutex.h"
#include "sanitizer_common/sanitizer_posix.h"
-#include "sys/mman.h"
#include "xray_utils.h"
+#include <sys/mman.h>
#include <cstddef>
#include <cstdint>
+#ifndef MAP_NORESERVE
+// no-op on NetBSD (at least), unsupported flag on FreeBSD basically because unneeded
+#define MAP_NORESERVE 0
+#endif
+
namespace __xray {
/// The Allocator type hands out fixed-sized chunks of memory that are
