45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
diff --git a/base/debug/stack_trace.cc b/base/debug/stack_trace.cc
|
|
index d8ca822..ffe1f08 100644
|
|
--- a/base/debug/stack_trace.cc
|
|
+++ b/base/debug/stack_trace.cc
|
|
@@ -225,7 +225,9 @@ void StackTrace::Print() const {
|
|
}
|
|
|
|
void StackTrace::OutputToStream(std::ostream* os) const {
|
|
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX)
|
|
OutputToStreamWithPrefix(os, nullptr);
|
|
+#endif
|
|
}
|
|
|
|
std::string StackTrace::ToString() const {
|
|
@@ -233,14 +233,14 @@ std::string StackTrace::ToString() const {
|
|
}
|
|
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
|
|
std::stringstream stream;
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX)
|
|
OutputToStreamWithPrefix(&stream, prefix_string);
|
|
#endif
|
|
return stream.str();
|
|
}
|
|
|
|
std::ostream& operator<<(std::ostream& os, const StackTrace& s) {
|
|
-#if !defined(__UCLIBC__) & !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(__UCLIBC__) & !defined(_AIX)
|
|
s.OutputToStream(&os);
|
|
#else
|
|
os << "StackTrace::OutputToStream not implemented.";
|
|
diff --git a/base/logging.cc b/base/logging.cc
|
|
index 36b8bfc..dd830fe 100644
|
|
--- a/base/logging.cc
|
|
+++ b/base/logging.cc
|
|
@@ -607,7 +607,7 @@ LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
|
|
LogMessage::~LogMessage() {
|
|
size_t stack_start = stream_.tellp();
|
|
#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
|
|
- !defined(OS_AIX)
|
|
+ !defined(OS_AIX) && defined(__GLIBC__)
|
|
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
|
|
// Include a stack trace on a fatal, unless a debugger is attached.
|
|
base::debug::StackTrace stack_trace;
|