Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(876)

Unified Diff: src/platform-linux.cc

Issue 9702067: Fix glibc presence checks that are incorrectly triggered in some cases. (Closed)
Patch Set: rebased on r11230 Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-linux.cc
diff --git a/src/platform-linux.cc b/src/platform-linux.cc
index ca394aafce640fb995981c5070f71640e493b0d0..ca7d2835df2ad7ca38c2b28259308867832594a7 100644
--- a/src/platform-linux.cc
+++ b/src/platform-linux.cc
@@ -46,9 +46,9 @@
#include <sys/stat.h> // open
#include <fcntl.h> // open
#include <unistd.h> // sysconf
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
#include <execinfo.h> // backtrace, backtrace_symbols
-#endif // def __GLIBC__
+#endif // defined(__GLIBC__) && !defined(__UCLIBC__)
#include <strings.h> // index
#include <errno.h>
#include <stdarg.h>
@@ -564,7 +564,7 @@ void OS::SignalCodeMovingGC() {
int OS::StackWalk(Vector<OS::StackFrame> frames) {
// backtrace is a glibc extension.
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
int frames_size = frames.length();
ScopedVector<void*> addresses(frames_size);
@@ -589,9 +589,9 @@ int OS::StackWalk(Vector<OS::StackFrame> frames) {
free(symbols);
return frames_count;
-#else // ndef __GLIBC__
+#else // defined(__GLIBC__) && !defined(__UCLIBC__)
return 0;
-#endif // ndef __GLIBC__
+#endif // defined(__GLIBC__) && !defined(__UCLIBC__)
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698