From 1edfdda8e0ee01ca4f9a0d889095595048f67699 Mon Sep 17 00:00:00 2001 From: Jens Reidel Date: Sun, 8 Jun 2025 06:34:49 +0200 Subject: [PATCH] [compiler-rt][Mips] Fix stat size check on mips64 musl The sizes of the struct stat on MIPS64 differ in musl vs glibc. See https://godbolt.org/z/qf9bcq8Y8 for the proof. Prior to this change, compilation for MIPS64 musl would fail. Signed-off-by: Jens Reidel --- .../lib/sanitizer_common/sanitizer_platform_limits_posix.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h index fdc52aa56c493..b952eac4d7cbd 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h @@ -102,6 +102,8 @@ const unsigned struct_kernel_stat_sz = SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) # if defined(_ABIN32) && _MIPS_SIM == _ABIN32 : FIRST_32_SECOND_64(176, 216); +# elif SANITIZER_MUSL + : FIRST_32_SECOND_64(160, 208); # else : FIRST_32_SECOND_64(160, 216); # endif