summaryrefslogtreecommitdiffstats
path: root/tests/backtrace-child.c
diff options
context:
space:
mode:
authorKurt Roeckx <[email protected]>2014-04-22 21:46:22 +0200
committerMark Wielaard <[email protected]>2014-04-23 10:56:01 +0200
commit02cefdaa6429e620d6457fdb3ad9934f194c5a93 (patch)
tree7825fc20716a17ec96529d0b9e289ed549bf3185 /tests/backtrace-child.c
parent3232479483cad695d1872b879128a23da3953a7d (diff)
Unwinding is only supported on Linux
Signed-off-by: Kurt Roeckx <[email protected]>
Diffstat (limited to 'tests/backtrace-child.c')
-rw-r--r--tests/backtrace-child.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/backtrace-child.c b/tests/backtrace-child.c
index 512aa238..788801c3 100644
--- a/tests/backtrace-child.c
+++ b/tests/backtrace-child.c
@@ -79,6 +79,18 @@
#include <stdio.h>
#include <unistd.h>
+#ifndef __linux__
+
+int
+main (int argc __attribute__ ((unused)), char **argv)
+{
+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
+ argv[0]);
+ return 77;
+}
+
+#else /* __linux__ */
+
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
#define NOINLINE_NOCLONE __attribute__ ((noinline, noclone))
#else
@@ -223,3 +235,6 @@ main (int argc UNUSED, char **argv)
raise (SIGUSR2);
return 0;
}
+
+#endif /* ! __linux__ */
+