From 18bed2c174362f76ddedf68bb700e8b2c817fcb5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 18 Jun 2020 14:09:59 +0200 Subject: Complete NetBSD compatibility --- libbutl/backtrace.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'libbutl/backtrace.cxx') 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)); -- cgit v1.1