about summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc/D2711.patch
blob: 8d229f2739992d194f6fb529022248725d6930f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -1314,7 +1314,7 @@
    ------------------------------------------------------------------------- */
 
 #if (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
-void sys_icache_invalidate(void *start, size_t len);
+#include <libkern/OSCacheControl.h>
 #endif
 
 /* On ARM and other platforms, we need to flush the cache after
@@ -1327,7 +1327,7 @@
   (void)exec_addr;
 #elif (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
   /* On iOS we need to use the special 'sys_icache_invalidate' call. */
-  sys_icache_invalidate(exec_addr, ((unsigned char*)exec_addr)+len);
+  sys_icache_invalidate(exec_addr, len);
 #elif defined(__GNUC__)
   /* For all other platforms, fall back to a libgcc builtin. */
   unsigned char* begin = (unsigned char*)exec_addr;