aboutsummaryrefslogtreecommitdiffstats
path: root/main/llvm/compiler-rt-0003-off_t.patch
blob: eee8ab0626f7541881239d6bacea7a57f3ad4d81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;