--- sigsegv.c.orig 2016-06-06 15:56:47.355074711 +0200 +++ sigsegv.c 2016-06-06 15:55:40.740071274 +0200 @@ -28,7 +28,9 @@ #include #include #include +#if defined(__GLIBC__) #include +#endif #include #ifndef NO_CPP_DEMANGLE //#include @@ -145,13 +147,15 @@ ip = bp[1]; bp = (void**)bp[0]; } -#else +#elif defined(__GLIBC__) a2j_error("Stack trace (non-dedicated):"); sz = backtrace(bt, 20); strings = backtrace_symbols(bt, sz); for(i = 0; i < sz; ++i) a2j_error("%s", strings[i]); +#else + a2j_error("Stack trace unavailable"); #endif a2j_error("End of stack trace"); exit (-1);