Skip to content

Commit

Permalink
linux: fix uClibc ifdeffery
Browse files Browse the repository at this point in the history
Remove duplicate inclusion of execinfo.h and make OS::DumpBacktrace
a NOOP on uclibc.

Review URL: https://codereview.chromium.org/13071007
Patch from Mostyn Bramley-Moore <mostynb@opera.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information
jkummerow@chromium.org committed Apr 9, 2013
1 parent d04de1f commit 36d3b1e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/platform-linux.cc
Expand Up @@ -38,7 +38,7 @@
#include <sys/types.h>
#include <stdlib.h>

#if defined(__GLIBC__)
#if defined(__GLIBC__) && !defined(__UCLIBC__)
#include <execinfo.h>
#include <cxxabi.h>
#endif
Expand All @@ -51,9 +51,6 @@
#include <sys/stat.h> // open
#include <fcntl.h> // open
#include <unistd.h> // sysconf
#if defined(__GLIBC__) && !defined(__UCLIBC__)
#include <execinfo.h> // backtrace, backtrace_symbols
#endif // defined(__GLIBC__) && !defined(__UCLIBC__)
#include <strings.h> // index
#include <errno.h>
#include <stdarg.h>
Expand Down Expand Up @@ -434,7 +431,7 @@ void OS::DebugBreak() {


void OS::DumpBacktrace() {
#if defined(__GLIBC__)
#if defined(__GLIBC__) && !defined(__UCLIBC__)
void* trace[100];
int size = backtrace(trace, ARRAY_SIZE(trace));
char** symbols = backtrace_symbols(trace, size);
Expand Down

0 comments on commit 36d3b1e

Please sign in to comment.