• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/jack2/0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch
Samuel MartinSamuel Martin committed b7b9426ccc917 May 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 4b2c73ad056aa327dc3b505410da68cf384317ba Mon Sep 17 00:00:00 2001
2
From: Samuel Martin <s.martin49@gmail.com>
3
Date: Mon, 16 May 2016 22:26:05 +0200
4
Subject: [PATCH] Make backtrace support depends on execinfo.h existence
5
​
6
In some C-libraries (like uclibc), backtrace support is optional, so the
7
execinfo.h file may not exist.
8
​
9
This change adds the check for execinfo.h header and conditionnaly enable
10
backtrace support.
11
​
12
This issue has been triggered by Buildroot farms:
13
  http://autobuild.buildroot.org/results/391/391e71a988250ea66ec4dbee6f60fdce9eaf2766/build-end.log
14
​
15
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
16
---
17
 dbus/sigsegv.c | 8 +++++++-
18
 wscript        | 1 +
19
 2 files changed, 8 insertions(+), 1 deletion(-)
20
​
21
diff --git a/dbus/sigsegv.c b/dbus/sigsegv.c
22
index ee12f91..0b31d89 100644
23
--- a/dbus/sigsegv.c
24
+++ b/dbus/sigsegv.c
25
@@ -27,7 +27,9 @@
26
 #include <stdio.h>
27
 #include <signal.h>
28
 #include <dlfcn.h>
29
-#include <execinfo.h>
30
+#if defined(HAVE_EXECINFO_H)
31
+# include <execinfo.h>
32
+#endif /* defined(HAVE_EXECINFO_H) */
33
 #include <errno.h>
34
 #ifndef NO_CPP_DEMANGLE
35
 char * __cxa_demangle(const char * __mangled_name, char * __output_buffer, size_t * __length, int * __status);
36
@@ -161,12 +163,16 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
37
         bp = (void**)bp[0];
38
     }
39
 #else
40
+# if defined(HAVE_EXECINFO_H)
41
     jack_error("Stack trace (non-dedicated):");
42
     sz = backtrace(bt, 20);
43
     strings = backtrace_symbols(bt, sz);
44
 
45
     for(i = 0; i < sz; ++i)
46
         jack_error("%s", strings[i]);
47
+# else /* defined(HAVE_EXECINFO_H) */
48
+    jack_error("Stack trace not available");
49
+# endif /* defined(HAVE_EXECINFO_H) */
50
 #endif
51
     jack_error("End of stack trace");
52
     exit (-1);
53
diff --git a/wscript b/wscript
54
index aef4bd8..63ba3aa 100644
55
--- a/wscript
56
+++ b/wscript
57
@@ -166,6 +166,7 @@ def configure(conf):
58
         if conf.env['BUILD_JACKDBUS'] != True:
59
             conf.fatal('jackdbus was explicitly requested but cannot be built')
60
 
61
+    conf.check_cc(header_name='execinfo.h', define_name="HAVE_EXECINFO_H", mandatory=False)
62
     conf.check_cc(header_name='samplerate.h', define_name="HAVE_SAMPLERATE")
63
 
64
     if conf.is_defined('HAVE_SAMPLERATE'):
65
-- 
66
2.8.2
67
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.