aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'executor/executor.cc')
-rw-r--r--executor/executor.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 702f8c3b4..4ea40e0f2 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -484,6 +484,14 @@ static void parse_handshake(const handshake_req& req);
#include "syscalls.h"
#if GOOS_linux
+#define MAP_FIXED_EXCLUSIVE MAP_FIXED_NOREPLACE
+#elif GOOS_freebsd
+#define MAP_FIXED_EXCLUSIVE (MAP_FIXED | MAP_EXCL)
+#else
+#define MAP_FIXED_EXCLUSIVE MAP_FIXED // The check is not supported.
+#endif
+
+#if GOOS_linux
#include "executor_linux.h"
#elif GOOS_fuchsia
#include "executor_fuchsia.h"