File memprof-0.6-nonx86.patch of Package memprof

--- mi-perfctr.c
+++ mi-perfctr.c
@@ -51,19 +51,30 @@
 #define SIGHANDLER_FRAMES 2
 
 static void
+#if defined (__linux__) && defined (__i386__)
 sigprof_handler (int unused, siginfo_t *si, ucontext_t *ucontext)
+#else
+sigprof_handler (int unused, siginfo_t *si)
+#endif
 {
     int saved_errno = errno;
+#if defined (__linux__) && defined (__i386__)
     struct sigcontext *ctx = (struct sigcontext *)&ucontext->uc_mcontext;
+#endif
     MIInfo info;
 
     info.alloc.operation = MI_TIME;
     info.alloc.old_ptr = NULL;
     info.alloc.new_ptr = NULL;
     info.alloc.size = 1;
-    
+
+#if defined (__linux__) && defined (__i386__)
     mi_call_with_signal_backtrace ((void *)ctx->eip, (void *)ctx->ebp, (void *)ctx->esp,
 				   mi_write_stack, &info);
+#else
+    mi_call_with_backtrace (SIGHANDLER_FRAMES, mi_write_stack, &info);
+#endif
+
 
     if (ioctl (perfctr_fd, VPERFCTR_IRESUME) < 0)
 	    mi_perror ("Error restarting handler interrupt");
--- speedintercept.c
+++ speedintercept.c
@@ -173,7 +173,7 @@
 	mi_call_with_signal_backtrace ((void *)ctx.eip, (void *)ctx.ebp, (void *)ctx.esp,
 				       mi_write_stack, &info);
 #else
-	mi_call_with_backtrace (SIGHANDLER_FRAMES, saved_pc, mi_write_stack, &info);
+	mi_call_with_backtrace (SIGHANDLER_FRAMES, mi_write_stack, &info);
 #endif
 
 	if (profile_type == SPEED_PROF_ITIMER)
openSUSE Build Service is sponsored by