[compiler-rt] Fix musl build

The change in PR #154268 introduced a dependency on the `__GLIBC_PREREQ`
macro, which is not defined in musl libc. This caused the build to fail
in environments using musl.

This patch fixes the build by including
`sanitizer_common/sanitizer_glibc_version.h`. This header provides a
fallback definition for `__GLIBC_PREREQ` when LLVM is built against
non-glibc C libraries, resolving the compilation error.
This commit is contained in:
Yi Kong 2025-08-21 15:16:50 +09:00
parent b96d5c2452
commit 1ff7c8bf0d

View File

@ -11,6 +11,7 @@
#include "dd_rtl.h"
#include "interception/interception.h"
#include "sanitizer_common/sanitizer_allocator_internal.h"
#include "sanitizer_common/sanitizer_glibc_version.h"
#include "sanitizer_common/sanitizer_procmaps.h"
using namespace __dsan;