radare/radare2 — pull request #1789 by krytarowski (2014-12-05 00:20:56+00:00)
Title: Enable backtrace(3) in NetBSD >=7.0

Tested with the following code:
#include
#include
int main(int argc, char **argv)
{
r_sys_backtrace();
return 0;
}

$ gcc `pkg-config --cflags r_util` `pkg-config --libs r_util` ./test.1.c
$ ./a.out
Backtrace 2 stack frames.
0x7f7ff781510a at /usr/pkg/lib/libr_util.so.0.9.9-git
0x4009d4 at ./a.out

$ uname -a
NetBSD chieftec 7.99.1 NetBSD 7.99.1 (GENERIC) #0: Fri Nov 7 22:04:53 CET 2014 kamil@chieftec:/tmp/netbsd-tmp/sys/arch/amd64/compile/GENERIC amd64

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64--netbsd
Configured with: /usr/src7/tools/gcc/../../external/gpl3/gcc/dist/configure --target=x86_64--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD nb1 20141012' --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-threads --with-tune=nocona --enable-libstdcxx-time=rt --with-mpc-lib=/var/obj/mknative/amd64-x86_64/usr/src7/external/lgpl3/mpc/lib/libmpc --with-mpfr-lib=/var/obj/mknative/amd64-x86_64/usr/src7/external/lgpl3/mpfr/lib/libmpfr --with-gmp-lib=/var/obj/mknative/amd64-x86_64/usr/src7/external/lgpl3/gmp/lib/libgmp --with-mpc-include=/usr/src7/external/lgpl3/mpc/dist/src --with-mpfr-include=/usr/src7/external/lgpl3/mpfr/dist/src --with-gmp-include=/usr/src7/external/lgpl3/gmp/lib/libgmp/arch/x86_64 --enable-tls --disable-multilib --disable-symvers --disable-libstdcxx-pch --build=x86_64-unknown-netbsd6.0. --host=x86_64--netbsd --with-sysroot=/var/obj/mknative/amd64-x86_64/usr/src7/destdir.amd64
Thread model: posix
gcc version 4.8.4 (nb1 20141012)