Skip to content

Commit 1ff7c8b

Browse files
committed
[compiler-rt] Fix musl build
The change in PR llvm#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.
1 parent b96d5c2 commit 1ff7c8b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler-rt/lib/tsan/dd/dd_interceptors.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "dd_rtl.h"
1212
#include "interception/interception.h"
1313
#include "sanitizer_common/sanitizer_allocator_internal.h"
14+
#include "sanitizer_common/sanitizer_glibc_version.h"
1415
#include "sanitizer_common/sanitizer_procmaps.h"
1516

1617
using namespace __dsan;

0 commit comments

Comments
 (0)