Skip to content

Commit

Permalink
Fix build (failure was noted in #147) (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin committed Feb 15, 2024
1 parent f6d4e11 commit 87ef7f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ lib boost_stacktrace_from_exception
: # requirements
<warnings>all
<target-os>linux:<library>dl
<target-os>windows:<build>no # not supported at the moment

# Require usable libbacktrace on other platforms
[ check-target-builds ../build//libbacktrace : : <build>no ]
: # default build
: # usage-requirements
#<link>shared:<define>BOOST_STACKTRACE_DYN_LINK=1
Expand Down
4 changes: 2 additions & 2 deletions doc/stacktrace.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ Generic recommendation is to *avoid signal handlers! Use* platform specific ways
[section Stacktrace from arbitrary exception]

[warning At the moment the functionality is only available for some of the
popular cxx run-times for POSIX systems. Make sure that your platform
is supported by running some tests.
popular C++ runtimes for POSIX systems and requires *libbacktrace*.
Make sure that your platform is supported by running some tests.
]

The library provides a way to get stacktrace from an exception as if the
Expand Down
6 changes: 6 additions & 0 deletions src/from_exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

#include "exception_headers.h"

// At the moment the file is used only on POSIX. _Unwind_Backtrace may be
// available on some platforms only if _GNU_SOURCE is defined.
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif

#include <boost/assert.hpp>
#include <boost/stacktrace/safe_dump_to.hpp>

Expand Down

0 comments on commit 87ef7f6

Please sign in to comment.