$OpenBSD: patch-v8_src_sampler_cc,v 1.1 2013/07/15 14:59:30 robert Exp $
--- v8/src/sampler.cc.orig.port	Wed Jun 12 09:31:53 2013
+++ v8/src/sampler.cc	Sat Jul 13 17:39:20 2013
@@ -36,8 +36,11 @@
 #include <signal.h>
 #include <sys/time.h>
 #include <sys/syscall.h>
-#if !defined(__ANDROID__) || defined(__BIONIC_HAVE_UCONTEXT_T)
+#if (!defined(__ANDROID__) || defined(__BIONIC_HAVE_UCONTEXT_T)) && !defined(__OpenBSD__)
 #include <ucontext.h>
+#else
+#define __BSD_VISIBLE 1
+#include <sys/signal.h>
 #endif
 #include <unistd.h>
 
@@ -246,7 +249,9 @@ void SignalHandler::HandleProfilerSignal(int signal, s
 #else
   // Extracting the sample from the context is extremely machine dependent.
   ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
+#if !defined(__OpenBSD__)
   mcontext_t& mcontext = ucontext->uc_mcontext;
+#endif
   sample->state = isolate->current_vm_state();
 #if defined(__linux__) || defined(__ANDROID__)
 #if V8_HOST_ARCH_IA32
@@ -301,7 +306,6 @@ void SignalHandler::HandleProfilerSignal(int signal, s
   sample->fp = reinterpret_cast<Address>(mcontext.__gregs[_REG_RBP]);
 #endif  // V8_HOST_ARCH_*
 #elif defined(__OpenBSD__)
-  USE(mcontext);
 #if V8_HOST_ARCH_IA32
   sample->pc = reinterpret_cast<Address>(ucontext->sc_eip);
   sample->sp = reinterpret_cast<Address>(ucontext->sc_esp);
