Skip to content

Commit 4b9c1d6

Browse files
committed
[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 <[email protected]>
1 parent 897ccdd commit 4b9c1d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ const unsigned struct_kernel_stat_sz = SANITIZER_ANDROID
102102
? FIRST_32_SECOND_64(104, 128)
103103
# if defined(_ABIN32) && _MIPS_SIM == _ABIN32
104104
: FIRST_32_SECOND_64(176, 216);
105-
# else
105+
# elif !SANITIZER_MUSL
106106
: FIRST_32_SECOND_64(160, 216);
107+
# else
108+
: FIRST_32_SECOND_64(160, 208);
107109
# endif
108110
const unsigned struct_kernel_stat64_sz = 104;
109111
#elif defined(__s390__) && !defined(__s390x__)

0 commit comments

Comments
 (0)