[V8] uclibc: __GLIBC__ might be defined on uclibc builds
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>
Mon, 5 Dec 2011 10:46:09 +0000 (18:46 +0800)
committerQt by Nokia <qt-info@nokia.com>
Thu, 1 Mar 2012 11:03:57 +0000 (12:03 +0100)
Uclibc defines __GLIBC__ becuase it is compatible in some ways with,
but it does not provide execinfo. Uclibc provides a define to disable
defining __GLIBC__ but Qt does not build with that right now. Check
for GLIBC and !UCLIBC here.

Change-Id: I582a16d16151f30c696ed0e9d185e2706599abe7
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
src/3rdparty/v8/src/platform-linux.cc

index 90f45dd..451f6fc 100644 (file)
@@ -46,7 +46,7 @@
 #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__
 #include <strings.h>    // index
@@ -553,7 +553,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);