Skip to content

Commit d74c49b

Browse files
committed
backtrace only for glibc on linux
1 parent b9be63f commit d74c49b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm-4.0.0.src/projects/compiler-rt/lib/lowfat/lowfat_linux.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ static void lowfat_random_page(void *buf)
6161
path);
6262
}
6363

64+
#ifdef __GLIBC__
6465
#include <execinfo.h>
6566
static LOWFAT_NOINLINE void lowfat_backtrace(void)
6667
{
@@ -73,6 +74,9 @@ static LOWFAT_NOINLINE void lowfat_backtrace(void)
7374
if (len == 0 || len == sizeof(trace) / sizeof(void *))
7475
fprintf(stderr, "...\n");
7576
}
77+
#else
78+
static LOWFAT_NOINLINE void lowfat_backtrace(void) { }
79+
#endif /* __GLIBC__ */
7680

7781
/*
7882
* Open a unique+anonymous shared memory object.

0 commit comments

Comments
 (0)