pre_args += '-DMAJOR_IN_MKDEV'
endif
-foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h']
+foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'execinfo.h']
if cc.compiles('#include <@0@>'.format(h), name : '@0@'.format(h))
pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
endif
#endif /* PIPE_OS_WINDOWS */
-#if defined(__GLIBC__) && !defined(__UCLIBC__)
+#if defined(HAVE_EXECINFO_H)
#include <execinfo.h>
return TRUE;
}
-#endif /* defined(__GLIBC__) && !defined(__UCLIBC__) */
+#endif /* defined(HAVE_EXECINFO_H) */
void
}
#endif
-#if defined(__GLIBC__) && !defined(__UCLIBC__)
+#if defined(HAVE_EXECINFO_H)
if (debug_symbol_name_glibc(addr, buf, size)) {
return;
}
-#endif
+#endif /* defined(HAVE_EXECINFO_H) */
util_snprintf(buf, size, "%p", addr);
buf[size - 1] = 0;
#endif
#if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__))
+ || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
#define USE_BACKTRACE
#endif
*/
#define DEBUG_BACKTRACE_SIZE 0
-#if DEBUG_BACKTRACE_SIZE == 0
+#if DEBUG_BACKTRACE_SIZE == 0 || !defined(HAVE_EXECINFO_H)
/* Use the standard debug output */
#define _DBG(...) DBG(__VA_ARGS__)
#else