$OpenBSD$
--- runtime/platform/openbsd.c.orig	Thu May 26 13:06:51 2016
+++ runtime/platform/openbsd.c	Thu May 26 13:05:24 2016
@@ -11,7 +11,13 @@ static void catcher (__attribute__ ((unused)) int sign
                      __attribute__ ((unused)) siginfo_t* info,
                      void* context) {
         ucontext_t* ucp = (ucontext_t*)context;
+#if (defined (__x86_64__))
+        GC_handleSigProf ((code_pointer) ucp->sc_rip);
+#elif (defined (__i386__))
         GC_handleSigProf ((code_pointer) ucp->sc_eip);
+#else
+#error Profiling handler is missing for this architecture
+#endif
 }
 
 void GC_setSigProfHandler (struct sigaction *sa) {
