$OpenBSD: patch-third_party_WebKit_Source_platform_heap_ThreadState_cpp,v 1.5 2015/01/22 11:16:41 robert Exp $
--- third_party/WebKit/Source/platform/heap/ThreadState.cpp.orig.port	Thu Dec 18 10:59:05 2014
+++ third_party/WebKit/Source/platform/heap/ThreadState.cpp	Fri Dec 26 18:06:47 2014
@@ -56,7 +56,7 @@ extern "C" void* __libc_stack_end;  // NOLINT
 #include <sanitizer/msan_interface.h>
 #endif
 
-#if OS(FREEBSD)
+#if OS(FREEBSD) || OS(OPENBSD)
 #include <pthread_np.h>
 #endif
 
@@ -64,12 +64,18 @@ namespace blink {
 
 static void* getStackStart()
 {
-#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD)
+#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD) || OS(OPENBSD)
     pthread_attr_t attr;
     int error;
 #if OS(FREEBSD)
     pthread_attr_init(&attr);
     error = pthread_attr_get_np(pthread_self(), &attr);
+#elif OS(OPENBSD)
+    stack_t ss;
+    void *base;
+    error = pthread_stackseg_np(pthread_self(), &ss);
+    base = (void*)((size_t) ss.ss_sp - ss.ss_size);
+    return reinterpret_cast<Address>(base) + ss.ss_size;
 #else
     error = pthread_getattr_np(pthread_self(), &attr);
 #endif
