Index: compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cpp =================================================================== --- compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cpp +++ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cpp @@ -64,9 +64,12 @@ COMPILER_CHECK(struct___old_kernel_stat_sz == sizeof(struct __old_kernel_stat)); #endif +# if defined(__LP64__) || \ + (!defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS != 64) COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat)); +# endif -#if defined(__i386__) +# if defined(__i386__) COMPILER_CHECK(struct_kernel_stat64_sz == sizeof(struct stat64)); #endif