about summary refs log tree commit diff
path: root/frida_mode/include/util.h
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2022-03-08 11:44:15 +0100
committerGitHub <noreply@github.com>2022-03-08 11:44:15 +0100
commit34d7a6357ed7bab5a934fdaf2622c72ad27c8f28 (patch)
tree2c88b9aaa9e42a51a52a69454717892c8f394d6c /frida_mode/include/util.h
parentae9897ff7b31b9135b85f78a9a0e4c036d8a0abd (diff)
parent852c036cae97113daac3ba5a791554bbbd5c8903 (diff)
downloadafl++-34d7a6357ed7bab5a934fdaf2622c72ad27c8f28.tar.gz
Merge pull request #1347 from WorksButNotTested/cache
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)