Index: lib/sanitizer_common/sanitizer_platform_limits_posix.h =================================================================== --- lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ lib/sanitizer_common/sanitizer_platform_limits_posix.h @@ -18,6 +18,10 @@ #include "sanitizer_internal_defs.h" #include "sanitizer_platform.h" +#if SANITIZER_LINUX +#include +#endif + namespace __sanitizer { extern unsigned struct_utsname_sz; extern unsigned struct_stat_sz; @@ -476,9 +480,14 @@ typedef unsigned int __sanitizer___kernel_old_uid_t; typedef unsigned int __sanitizer___kernel_old_gid_t; #else +#if defined(__aarch64__) + typedef __kernel_old_uid_t __sanitizer___kernel_old_uid_t; + typedef __kernel_old_gid_t __sanitizer___kernel_old_gid_t; +#else typedef unsigned short __sanitizer___kernel_old_uid_t; typedef unsigned short __sanitizer___kernel_old_gid_t; #endif +#endif typedef long long __sanitizer___kernel_loff_t; typedef struct {