Module: xenomai-2.5
Branch: master
Commit: f9dd111c7ae018523e0dddca5f87997da678409a
URL:    
http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=f9dd111c7ae018523e0dddca5f87997da678409a

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Thu Feb  4 14:22:17 2010 +0100

testsuite: fix compilation of latency with uclibc

---

 src/testsuite/latency/latency.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/testsuite/latency/latency.c b/src/testsuite/latency/latency.c
index ca5f1bf..f397b42 100644
--- a/src/testsuite/latency/latency.c
+++ b/src/testsuite/latency/latency.c
@@ -9,7 +9,9 @@
 #include <sys/time.h>
 #include <unistd.h>
 
+#ifndef __UCLIBC__
 #include <execinfo.h>
+#endif /* !__UCLIBC__ */
 
 #include <native/task.h>
 #include <native/timer.h>
@@ -447,7 +449,13 @@ void faulthand(int sig)
 
 void mode_sw(int sig)
 {
+#ifndef __UCLIBC__
        const char buffer[] = "Mode switch, aborting. Backtrace:\n";
+#else /* __UCLIBC__ */
+       const char buffer[] = "Mode switch, aborting."
+               " Backtrace unavailable with uclibc.\n";
+#endif /* __UCLIBC__ */
+       
        static void *bt[200];
        unsigned n;
 
@@ -457,8 +465,10 @@ void mode_sw(int sig)
        }
 
        write(STDERR_FILENO, buffer, sizeof(buffer));
+#ifndef __UCLIBC__
        n = backtrace(bt, sizeof(bt)/sizeof(bt[0]));
        backtrace_symbols_fd(bt, n, STDERR_FILENO);
+#endif /* !__UCLIBC__ */
 
        signal(sig, SIG_DFL);
        kill(getpid(), sig);


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

Reply via email to