summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2012-05-21 00:04:16 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2012-05-21 00:04:16 +0200
commit40de828d3cbf767b4e272eef4eafb0b320bba283 (patch)
treeb64d6733c2dbb9bdaa2604b95b36ef9dda91e118 /package
parentb20c77321fa87f880ead2f27ecf19fd7c4f436da (diff)
connmann: fix build on uClibc without backtrace support
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package')
-rw-r--r--package/connman/connman-uclibc-backtrace.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/package/connman/connman-uclibc-backtrace.patch b/package/connman/connman-uclibc-backtrace.patch
new file mode 100644
index 000000000..4b806c6dd
--- /dev/null
+++ b/package/connman/connman-uclibc-backtrace.patch
@@ -0,0 +1,44 @@
+[PATCH] fix build on uClibc without UCLIBC_HAS_BACKTRACE
+
+Backtrace support is only used for logging on signal errors, which
+isn't really critical, so simply remove backtrace info if not
+available in uClibc.
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ src/log.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+Index: connman-0.78/src/log.c
+===================================================================
+--- connman-0.78.orig/src/log.c
++++ connman-0.78/src/log.c
+@@ -30,7 +30,12 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
++#include <features.h>
++/* backtrace support is optional on uClibc */
++#if !(defined(__UCLIBC__) && !defined (__UCLIBC_HAS_BACKTRACE__))
++#define HAVE_BACKTRACE
+ #include <execinfo.h>
++#endif
+ #include <dlfcn.h>
+
+ #include "connman.h"
+@@ -112,6 +117,7 @@
+
+ static void print_backtrace(unsigned int offset)
+ {
++#ifdef HAVE_BACKTRACE
+ void *frames[99];
+ size_t n_ptrs;
+ unsigned int i;
+@@ -210,6 +216,7 @@
+
+ close(outfd[1]);
+ close(infd[0]);
++#endif /* HAVE_BACKTRACE */
+ }
+
+ static void signal_handler(int signo)