1 diff --git a/base/debug/stack_trace.cc b/base/debug/stack_trace.cc
2 index f5e2dbb..0f2ce52 100644
3 --- a/base/debug/stack_trace.cc
4 +++ b/base/debug/stack_trace.cc
5 @@ -217,7 +217,9 @@ void StackTrace::Print() const {
8 void StackTrace::OutputToStream(std::ostream* os) const {
9 +#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX)
10 OutputToStreamWithPrefix(os, nullptr);
14 std::string StackTrace::ToString() const {
15 @@ -225,7 +227,7 @@ std::string StackTrace::ToString() const {
17 std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
18 std::stringstream stream;
19 -#if !defined(__UCLIBC__) && !defined(_AIX)
20 +#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX)
21 OutputToStreamWithPrefix(&stream, prefix_string);
24 diff --git a/base/logging.cc b/base/logging.cc
25 index 7722d37..a623e78 100644
28 @@ -558,8 +558,8 @@ LogMessage::LogMessage(const char* file, int line, const char* condition)
30 LogMessage::~LogMessage() {
31 size_t stack_start = stream_.tellp();
32 -#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
34 +#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) && \
35 + !defined(__UCLIBC__) && !defined(OS_AIX)
36 if (severity_ == LOGGING_FATAL && !base::debug::BeingDebugged()) {
37 // Include a stack trace on a fatal, unless a debugger is attached.
38 base::debug::StackTrace stack_trace;