diff options
Diffstat (limited to 'crawl-ref/source/crash-u.cc')
-rw-r--r-- | crawl-ref/source/crash-u.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/crash-u.cc b/crawl-ref/source/crash-u.cc index 8a1f3d000d..ab76768b25 100644 --- a/crawl-ref/source/crash-u.cc +++ b/crawl-ref/source/crash-u.cc @@ -13,7 +13,7 @@ REVISION("$Rev$"); #include <signal.h> #endif -#ifdef __GLIBC__ +#if defined(__GLIBC__) || defined(__APPLE__) #include <execinfo.h> #endif @@ -136,7 +136,7 @@ void dump_crash_info(FILE* file) name); } -#ifdef __GLIBC__ +#if defined(__GLIBC__) || defined(__APPLE__) // NOTE: This should work on OS X, according to // http://developer.apple.com/DOCUMENTATION/DARWIN/Reference/ManPages/man3/backtrace_symbols.3.html @@ -166,7 +166,7 @@ void write_stack_trace(FILE* file, int ignore_count) free(symbols); } -#else // ifdef __GLIBC__ +#else // if defined(__GLIBC__) || defined(__APPLE__) void write_stack_trace(FILE* file, int ignore_count) { const char* msg = "Unable to get stack trace on this platform." EOL; |