about summary refs log tree commit diff
path: root/frida_mode/include/util.h
diff options
context:
space:
mode:
authorYour Name <you@example.com>2022-02-18 17:39:21 +0000
committerYour Name <you@example.com>2022-02-18 17:39:21 +0000
commit852c036cae97113daac3ba5a791554bbbd5c8903 (patch)
treec2cd8c1bba32d5ca5e17d74dcd97e1bf6f7e589b /frida_mode/include/util.h
parenta5943dc782d1a6047aaa8f455ab37e4a31369311 (diff)
downloadafl++-852c036cae97113daac3ba5a791554bbbd5c8903.tar.gz
Add global caching of block translation to instrumentation
Diffstat (limited to 'frida_mode/include/util.h')
-rw-r--r--frida_mode/include/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/frida_mode/include/util.h b/frida_mode/include/util.h
index bd37687c..b04e0a26 100644
--- a/frida_mode/include/util.h
+++ b/frida_mode/include/util.h
@@ -5,6 +5,14 @@
 
 #include "debug.h"
 
+#ifndef MAP_FIXED_NOREPLACE
+  #ifdef MAP_EXCL
+    #define MAP_FIXED_NOREPLACE MAP_EXCL | MAP_FIXED
+  #else
+    #define MAP_FIXED_NOREPLACE MAP_FIXED
+  #endif
+#endif
+
 #define UNUSED_PARAMETER(x) (void)(x)
 #define IGNORED_RETURN(x) (void)!(x)