summary refs log tree commit diff
path: root/sysdeps/s390/s390-32/backtrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/s390/s390-32/backtrace.c')
-rw-r--r--sysdeps/s390/s390-32/backtrace.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/s390/s390-32/backtrace.c b/sysdeps/s390/s390-32/backtrace.c
index 3ade10c85b..e3122cf1fc 100644
--- a/sysdeps/s390/s390-32/backtrace.c
+++ b/sysdeps/s390/s390-32/backtrace.c
@@ -77,10 +77,6 @@ init (void)
   if (unwind_getip == NULL)
     unwind_backtrace = NULL;
 }
-#else
-# define unwind_backtrace _Unwind_Backtrace
-# define unwind_getip _Unwind_GetIP
-#endif
 
 static int
 __backchain_backtrace (void **array, int size)
@@ -107,6 +103,10 @@ __backchain_backtrace (void **array, int size)
 
   return cnt;
 }
+#else
+# define unwind_backtrace _Unwind_Backtrace
+# define unwind_getip _Unwind_GetIP
+#endif
 
 static _Unwind_Reason_Code
 backtrace_helper (struct _Unwind_Context *ctx, void *a)
@@ -130,9 +130,10 @@ __backtrace (void **array, int size)
   __libc_once_define (static, once);
 
   __libc_once (once, init);
-#endif
+
   if (unwind_backtrace == NULL)
     return __backchain_backtrace (array, size);
+#endif
 
   if (size >= 1)
     unwind_backtrace (backtrace_helper, &arg);