Skip to content

Commit 26800a2

Browse files
krajMaskRay
authored andcommitted
[sanitizer] Undef _TIME_BITS along with _FILE_OFFSET_BITS on Linux
On 32-bit glibc>=2.34 systems using 64bit time_t build fails because _FILE_OFFSET_BITS is undefined here but _TIME_BITS is still set to 64 Fixes ``` /usr/include/features-time64.h:26:5: error: "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" | ^ | 1 error generated. ``` Reviewed By: thesamesam, MaskRay Differential Revision: https://reviews.llvm.org/D140812
1 parent a8f13db commit 26800a2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// depends on _FILE_OFFSET_BITS setting.
1919
// To get this "true" dirent definition, we undefine _FILE_OFFSET_BITS below.
2020
#undef _FILE_OFFSET_BITS
21+
#undef _TIME_BITS
2122
#endif
2223

2324
// Must go after undef _FILE_OFFSET_BITS.

0 commit comments

Comments
 (0)