aboutsummaryrefslogtreecommitdiff
path: root/libbutl/backtrace.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-06-18 14:09:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-06-18 14:09:59 +0200
commit18bed2c174362f76ddedf68bb700e8b2c817fcb5 (patch)
tree463c4a495386c9ec1869f4434367bfcfc43ea884 /libbutl/backtrace.cxx
parent639ff12af754d024a562925a52406ace0d3c673b (diff)
Complete NetBSD compatibility
Diffstat (limited to 'libbutl/backtrace.cxx')
-rw-r--r--libbutl/backtrace.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/libbutl/backtrace.cxx b/libbutl/backtrace.cxx
index 119f4d1..8c9c6ae 100644
--- a/libbutl/backtrace.cxx
+++ b/libbutl/backtrace.cxx
@@ -9,15 +9,16 @@
// complications of the build scripts/makefiles.
//
// With glibc linking with -rdynamic gives (non-static) function names.
-// FreeBSD requires explicitly linking -lexecinfo.
+// FreeBSD/NetBSD requires explicitly linking -lexecinfo.
//
// Note that some libc implementation on Linux (most notably, musl), don't
// support this, at least not out of the box.
//
#ifndef BUILD2_BOOTSTRAP
-# if defined(__GLIBC__) || \
- defined(__APPLE__) || \
- defined(__FreeBSD__)
+# if defined(__GLIBC__) || \
+ defined(__APPLE__) || \
+ defined(__FreeBSD__) || \
+ defined(__NetBSD__)
# define LIBBUTL_BACKTRACE
# endif
#else
@@ -71,7 +72,7 @@ namespace butl
#ifdef LIBBUTL_BACKTRACE
- // Note: backtrace() returns int on Linux and MacOS and size_t on FreeBSD.
+ // Note: backtrace() returns int on Linux and MacOS and size_t on *BSD.
//
void* buf[1024];
auto n (::backtrace (buf, 1024));