From: Mikko Rasa Date: Fri, 15 Aug 2008 17:55:32 +0000 (+0000) Subject: execinfo.h is a GNU extension so check for glibc X-Git-Tag: 1.1~14 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=9f2774a500d779af9a38f42bfb03b507444a47b0;p=libs%2Fcore.git execinfo.h is a GNU extension so check for glibc --- diff --git a/source/debug/backtrace.cpp b/source/debug/backtrace.cpp index 643fdf2..5e96005 100644 --- a/source/debug/backtrace.cpp +++ b/source/debug/backtrace.cpp @@ -4,7 +4,10 @@ This file is part of libmspcore Copyright © 2007 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ -#ifndef WIN32 + +// Must include something to test for glibc +#include +#if !defined(WIN32) && defined(__GLIBC__) #include #include #endif @@ -18,12 +21,10 @@ namespace Debug { Backtrace Backtrace::create() { -#ifndef WIN32 +#if !defined(WIN32) && defined(__GLIBC__) void *addresses[50]; int count=::backtrace(addresses, 50); - //char **symbols=backtrace_symbols(addresses, count); - Backtrace bt; Dl_info dli; for(int i=0; i