aboutsummaryrefslogtreecommitdiffstats
path: root/main/llvm/compiler-rt-0003-off_t.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/llvm/compiler-rt-0003-off_t.patch')
-rw-r--r--main/llvm/compiler-rt-0003-off_t.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/main/llvm/compiler-rt-0003-off_t.patch b/main/llvm/compiler-rt-0003-off_t.patch
new file mode 100644
index 0000000000..eee8ab0626
--- /dev/null
+++ b/main/llvm/compiler-rt-0003-off_t.patch
@@ -0,0 +1,16 @@
+on musl libc off_t is always 64bit
+
+This is needed for interception to build on 32 bit musl
+
+--- a/lib/sanitizer_common/sanitizer_internal_defs.h
++++ b/lib/sanitizer_common/sanitizer_internal_defs.h
+@@ -87,7 +87,8 @@
+ // like pread and mmap, as opposed to pread64 and mmap64.
+ // FreeBSD, Mac and Linux/x86-64 are special.
+ #if SANITIZER_FREEBSD || SANITIZER_MAC || \
+- (SANITIZER_LINUX && defined(__x86_64__))
++ (SANITIZER_LINUX && \
++ (defined(__x86_64__) || (!defined(__GLIBC__) && !SANITIZER_ANDROID)))
+ typedef u64 OFF_T;
+ #else
+ typedef uptr OFF_T;