Use the correct macro to include backtrace

execinfo.h and backtrace() are GNU extensions provided by glibc
and not by gcc, see:

http://www.gnu.org/software/libc/manual/html_mono/libc.html#Backtraces

Signed-off-by: Carlo Landmeter <clandmeter@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4453
This commit is contained in:
Carlo Landmeter 2016-03-01 15:23:09 +01:00 committed by Brian Behlendorf
parent 1ad32f0a18
commit 967798d04a
1 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@
#include <math.h> #include <math.h>
#include <sys/fs/zfs.h> #include <sys/fs/zfs.h>
#include <libnvpair.h> #include <libnvpair.h>
#ifdef __GNUC__ #ifdef __GLIBC__
#include <execinfo.h> /* for backtrace() */ #include <execinfo.h> /* for backtrace() */
#endif #endif
@ -490,7 +490,7 @@ _umem_logging_init(void)
static void sig_handler(int signo) static void sig_handler(int signo)
{ {
struct sigaction action; struct sigaction action;
#ifdef __GNUC__ /* backtrace() is a GNU extension */ #ifdef __GLIBC__ /* backtrace() is a GNU extension */
int nptrs; int nptrs;
void *buffer[BACKTRACE_SZ]; void *buffer[BACKTRACE_SZ];