[sanitizer] Undef _TIME_BITS along with _FILE_OFFSET_BITS on Linux
authorKhem Raj <raj.khem@gmail.com>
Fri, 3 Feb 2023 19:48:35 +0000 (11:48 -0800)
committerFangrui Song <i@maskray.me>
Fri, 3 Feb 2023 19:48:35 +0000 (11:48 -0800)
commit26800a2c7e7996dc773b4e990dd5cca41c45e1a9
tree313b2ccb05d47b609e1ef83ba6702645c3c3f6a6
parenta8f13dbdeb31be37ee15b5febb7cc2137bbece67
[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
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp