dahdi-tools: rework patch
Currently builds for ARC are failing, causing follow-up breakage. It seems that uclibc defines __GLIBC__ on the build bots. This commit adds a test for execinfo.h to the configure script. The result of the test is then used in xpp/xtalk/debug.c. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
parent
f4fb577f9b
commit
9b4f78d799
2 changed files with 13 additions and 3 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=dahdi-tools
|
PKG_NAME:=dahdi-tools
|
||||||
PKG_VERSION:=3.0.0
|
PKG_VERSION:=3.0.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/dahdi-tools/releases
|
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/dahdi-tools/releases
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
+#ifdef __GLIBC__
|
+#ifdef HAVE_EXECINFO_H
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
+#endif
|
+#endif
|
||||||
#include <xtalk/debug.h>
|
#include <xtalk/debug.h>
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
/* from glibc info(1) */
|
/* from glibc info(1) */
|
||||||
void print_backtrace(FILE *fp)
|
void print_backtrace(FILE *fp)
|
||||||
{
|
{
|
||||||
+#ifdef __GLIBC__
|
+#ifdef HAVE_EXECINFO_H
|
||||||
void *array[10];
|
void *array[10];
|
||||||
size_t size;
|
size_t size;
|
||||||
char **strings;
|
char **strings;
|
||||||
|
@ -24,3 +24,13 @@
|
||||||
free(strings);
|
free(strings);
|
||||||
+#endif
|
+#endif
|
||||||
}
|
}
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -161,6 +161,7 @@ AC_SUBST(DAHDI_DECLARATION_AFTER_STATEME
|
||||||
|
# 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
|
||||||
|
|
Loading…
Reference in a new issue