diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h index f8f03454ea169..9208b12552ff5 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h @@ -139,8 +139,14 @@ namespace __sanitizer { #if defined(__UINTPTR_TYPE__) +# if defined(__arm__) && defined(__linux__) +// Linux Arm headers redefine __UINTPTR_TYPE__ and disagree with clang/gcc. +typedef unsigned int uptr; +typedef int sptr; +# else typedef __UINTPTR_TYPE__ uptr; typedef __INTPTR_TYPE__ sptr; +# endif #elif defined(_WIN64) // 64-bit Windows uses LLP64 data model. typedef unsigned long long uptr;