From 581e9368d3a699c460cf1445dcbb6d21a0f00b00 Mon Sep 17 00:00:00 2001 From: "danno@chromium.org" Date: Thu, 5 Apr 2012 15:22:51 +0000 Subject: [PATCH] Fix glibc presence checks that are incorrectly triggered in some cases. This allows compilation of V8 using uClibc. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/9702067 Patch from Daniel Kalmar . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/platform-linux.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform-linux.cc b/src/platform-linux.cc index 3a44357aad..9bea32df3a 100644 --- a/src/platform-linux.cc +++ b/src/platform-linux.cc @@ -46,9 +46,9 @@ #include // open #include // open #include // sysconf -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) #include // backtrace, backtrace_symbols -#endif // def __GLIBC__ +#endif // defined(__GLIBC__) && !defined(__UCLIBC__) #include // index #include #include @@ -535,7 +535,7 @@ void OS::SignalCodeMovingGC() { int OS::StackWalk(Vector frames) { // backtrace is a glibc extension. -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) int frames_size = frames.length(); ScopedVector addresses(frames_size); @@ -560,9 +560,9 @@ int OS::StackWalk(Vector frames) { free(symbols); return frames_count; -#else // ndef __GLIBC__ +#else // defined(__GLIBC__) && !defined(__UCLIBC__) return 0; -#endif // ndef __GLIBC__ +#endif // defined(__GLIBC__) && !defined(__UCLIBC__) }