about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/profil-counter.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdeps/generic/profil-counter.h b/sysdeps/generic/profil-counter.h
index 1fa7bc7653..da13e6aca9 100644
--- a/sysdeps/generic/profil-counter.h
+++ b/sysdeps/generic/profil-counter.h
@@ -19,8 +19,18 @@
 /* In many Unix systems signal handlers are called like this
    and the interrupted PC is easily findable in the `struct sigcontext'.  */
 
+#ifdef SA_SIGINFO
+#include <sigcontextinfo.h>
+
+static void
+__profil_counter (int signr, siginfo_t *info, void *ctx)
+{
+  profil_count (sigcontext_get_pc (ctx));
+}
+#else
 static void
 __profil_counter (int signr, int code, struct sigcontext *scp)
 {
   profil_count ((uintptr_t) scp->sc_pc);
 }
+#endif