You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-misc/dahdi-tools/files/dahdi-tools-3.1.0-execinfo....

41 lines
1.2 KiB

--- a/configure.ac 2020-03-28 22:28:35.614340050 +0200
+++ b/configure.ac 2020-03-28 22:28:55.084181570 +0200
@@ -161,6 +161,7 @@
# Checks for header files.
AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h])
+AC_CHECK_HEADERS([execinfo.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
--- a/xpp/xtalk/debug.c 2020-03-28 22:41:43.507810560 +0200
+++ b/xpp/xtalk/debug.c 2020-03-28 22:41:10.538087608 +0200
@@ -27,8 +27,10 @@
#include <stdarg.h>
#include <syslog.h>
-#include <execinfo.h>
#include <xtalk/debug.h>
#include <autoconfig.h>
+#ifdef HAVE_EXECINFO_H
+#include <execinfo.h>
+#endif
int verbose = LOG_INFO;
int debug_mask;
@@ -61,6 +63,7 @@
/* from glibc info(1) */
void print_backtrace(FILE *fp)
{
+#ifdef HAVE_EXECINFO_H
void *array[10];
size_t size;
char **strings;
@@ -71,4 +74,7 @@
for (i = 0; i < size; i++)
fprintf(fp, "%s\n", strings[i]);
free(strings);
+#else
+ fprintf(fp, "backtrace information only available if execinfo.h is available.\n");
+#endif
}