kumquat-buildroot/package/connman/connman-000-uclibc-backtrace.patch
Yann E. MORIN 3f251aa5b9 package/connman: version bump to 1.12, and fix build with newer kernels headers
... while keeping compatibility with older ones.

Fixes autobuild failure:
http://autobuild.buildroot.org/results/f99ae7af46c70f7c356b7771321511a42eb3694d/

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-24 12:42:01 +01:00

45 lines
1.1 KiB
Diff

[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)