summaryrefslogtreecommitdiffstats
path: root/tests/backtrace-dwarf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/backtrace-dwarf.c')
-rw-r--r--tests/backtrace-dwarf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
index f75e1202..87d088aa 100644
--- a/tests/backtrace-dwarf.c
+++ b/tests/backtrace-dwarf.c
@@ -25,6 +25,18 @@
#include <sys/ptrace.h>
#include ELFUTILS_HEADER(dwfl)
+#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__ */
+
static void cleanup_13_abort (void);
#define main cleanup_13_main
#include "cleanup-13.c"
@@ -148,3 +160,6 @@ main (int argc __attribute__ ((unused)), char **argv)
/* There is an exit (0) call if we find the "main" frame, */
error (1, 0, "dwfl_getthreads: %s", dwfl_errmsg (-1));
}
+
+#endif /* ! __linux__ */
+