Module: xenomai-3
Branch: next
Commit: 8cb527787b37b31dc20afee8b2e9c425d74b5978
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=8cb527787b37b31dc20afee8b2e9c425d74b5978

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Apr 15 15:33:00 2017 +0200

lib/cobalt: better detect lack of backtrace() support

---

 configure.ac           |    3 ++-
 lib/cobalt/sigshadow.c |   10 ++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index bc586e9..f8b2da8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -519,7 +519,8 @@ AC_CHECK_FUNCS([pthread_mutexattr_setprotocol       \
                sched_getcpu                    \
                clock_nanosleep                 \
                shm_open                        \
-               shm_unlink])
+               shm_unlink                      \
+               backtrace])
 LIBS="$save_LIBS"
 
 save_CPPFLAGS="$CPPFLAGS"
diff --git a/lib/cobalt/sigshadow.c b/lib/cobalt/sigshadow.c
index 3f4e9c5..f58e341 100644
--- a/lib/cobalt/sigshadow.c
+++ b/lib/cobalt/sigshadow.c
@@ -20,17 +20,15 @@
 #include <asm/xenomai/syscall.h>
 #include "internal.h"
 
-#ifdef __UCLIBC__
+#if !HAVE_BACKTRACE
 static inline int backtrace(void **buffer, int size)
 {
-       /*
-        * We have no backtrace support in uClibc.
-        */
+       /* Not all *libcs support backtrace(). */
        return 0;
 }
-#else /* !__UCLIBC__ */
+#else
 #include <execinfo.h>
-#endif /* !__UCLIBC__ */
+#endif
 
 static struct sigaction sigshadow_action_orig;
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to