Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/util/invariant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Author: Martin Brain, [email protected]
// So we should include something explicitly from the C library
// to check if the C library is glibc.
#include <assert.h>
#ifdef __GLIBC__
#if defined(__GLIBC__) || defined(__APPLE__)

// GCC needs LINKFLAGS="-rdynamic" to give function names in the backtrace
#include <execinfo.h>
Expand Down Expand Up @@ -78,7 +78,7 @@ static bool output_demangled_name(
void print_backtrace(
std::ostream &out)
{
#ifdef __GLIBC__
#if defined(__GLIBC__) || defined(__APPLE__)
void * stack[50] = {};

std::size_t entries=backtrace(stack, sizeof(stack) / sizeof(void *));
Expand Down