aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/target/pcre/ios-clear_cache.patch
diff options
context:
space:
mode:
Diffstat (limited to 'tools/depends/target/pcre/ios-clear_cache.patch')
-rw-r--r--tools/depends/target/pcre/ios-clear_cache.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/depends/target/pcre/ios-clear_cache.patch b/tools/depends/target/pcre/ios-clear_cache.patch
new file mode 100644
index 0000000000..75d5683912
--- /dev/null
+++ b/tools/depends/target/pcre/ios-clear_cache.patch
@@ -0,0 +1,20 @@
+--- a/sljit/sljitConfigInternal.h
++++ b/sljit/sljitConfigInternal.h
+@@ -275,12 +275,16 @@
+ #define SLJIT_API_FUNC_ATTRIBUTE
+ #endif /* (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC) */
+
++#if defined(__APPLE__)
++#include <libkern/OSCacheControl.h>
++#endif
++
+ /****************************/
+ /* Instruction cache flush. */
+ /****************************/
+
+ #if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin)
+-#if __has_builtin(__builtin___clear_cache)
++#if __has_builtin(__builtin___clear_cache) && !defined(__APPLE__)
+
+ #define SLJIT_CACHE_FLUSH(from, to) \
+ __builtin___clear_cache((char*)from, (char*)to)