Index: lib/sanitizer_common/sanitizer_common_syscalls.inc =================================================================== --- lib/sanitizer_common/sanitizer_common_syscalls.inc +++ lib/sanitizer_common/sanitizer_common_syscalls.inc @@ -1443,6 +1443,12 @@ POST_SYSCALL(fchown)(long res, long fd, long user, long group) {} +// Syscalls below are only available on 64-bit target if CONFIG_COMPAT +// (which enables CONFIG_HAVE_UID16) is selected in kernel defconfig. +// These syscalls implementations are needed for 32-bit (compat) +// applications on 64-bit target. They will not be used by 64-bit +// applications. +#if SANITIZER_WORDSIZE == 32 PRE_SYSCALL(chown16)(const void *filename, long user, long group) { if (filename) PRE_READ(filename, @@ -1552,6 +1558,7 @@ PRE_SYSCALL(getegid16)() {} POST_SYSCALL(getegid16)(long res) {} +#endif // SANITIZER_WORDSIZE == 32 PRE_SYSCALL(utime)(void *filename, void *times) {} Index: lib/sanitizer_common/sanitizer_platform_limits_posix.cc =================================================================== --- lib/sanitizer_common/sanitizer_platform_limits_posix.cc +++ lib/sanitizer_common/sanitizer_platform_limits_posix.cc @@ -1006,7 +1006,7 @@ CHECK_TYPE_SIZE(__kernel_uid_t); CHECK_TYPE_SIZE(__kernel_gid_t); -#if !defined(__aarch64__) +#if SANITIZER_WORDSIZE == 32 CHECK_TYPE_SIZE(__kernel_old_uid_t); CHECK_TYPE_SIZE(__kernel_old_gid_t); #endif