[all-commits] [llvm/llvm-project] a12170: Undef _TIME_BITS along with _FILE_OFFSET_BITS
Thomas Petazzoni via All-commits
all-commits at lists.llvm.org
Mon Oct 14 12:02:56 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a1217020da219386b29c1a5a4a217904ecf07d7d
https://github.com/llvm/llvm-project/commit/a1217020da219386b29c1a5a4a217904ecf07d7d
Author: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Date: 2024-10-14 (Mon, 14 Oct 2024)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp
Log Message:
-----------
Undef _TIME_BITS along with _FILE_OFFSET_BITS
This change is identical to
26800a2c7e7996dc773b4e990dd5cca41c45e1a9 ("[sanitizer] Undef
_TIME_BITS along with _FILE_OFFSET_BITS on Linux"), but for
sanitizer_procmaps_solaris.cpp.
Indeed, even though sanitizer_procmaps_solaris.cpp is Solaris
specific, it also gets built on Linux platforms. It also includes
sanitizer_platform.h, which also ends up including features-time64.h,
causing a build failure on 32-bit Linux platforms on which 64-bit
time_t is enabled by setting _TIME_BITS=64.
To fix this, we do the same change: undefine _TIME_BITS, which anyway
will cause no harm as the rest of this file is inside a
SANITIZER_SOLARIS compile-time conditional.
Fixes:
In file included from /home/thomas/buildroot/buildroot/output/host/i686-buildroot-linux-gnu/sysroot/usr/include/features.h:394,
from ../../../../libsanitizer/sanitizer_common/sanitizer_platform.h:25,
from ../../../../libsanitizer/sanitizer_common/sanitizer_procmaps_solaris.cpp:14:
/home/thomas/buildroot/buildroot/output/host/i686-buildroot-linux-gnu/sysroot/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is al
lowed only with _FILE_OFFSET_BITS=64"
26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
| ^~~~~
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Closes: https://github.com/llvm/llvm-project/pull/99699
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list