use pthread, getthrid

Index: rts/System/Platform/Linux/ThreadSupport.cpp
--- rts/System/Platform/Linux/ThreadSupport.cpp.orig
+++ rts/System/Platform/Linux/ThreadSupport.cpp
@@ -7,6 +7,10 @@
 #include <csignal>
 #include <fstream>
 #include <sys/syscall.h>
+#ifdef __OpenBSD__
+	#include <unistd.h>
+	#include <pthread_np.h>
+#endif
 
 #include "System/Log/ILog.h"
 #include "System/Platform/Threading.h"
@@ -42,7 +46,7 @@ enum LinuxThreadState {
  * There is no glibc wrapper for this system call, so you have to write one:
  */
 static int gettid() {
-	return syscall(SYS_gettid);
+	return getthrid();
 }
 
 /**
@@ -87,12 +91,12 @@ static void ThreadSIGUSR1Handler(int signum, siginfo_t
 	LOG_L(L_DEBUG, "[%s][1]", __func__);
 
 	// Fill in ucontext_t structure before locking, this allows stack walking...
-	const int err = getcontext(&(localThreadControls->ucontext));
+	//const int err = getcontext(&(localThreadControls->ucontext));
 
-	if (err != 0) {
-		LOG_L(L_ERROR, "[%s] couldn't get thread context within suspend signal handler: %s", __func__, strerror(err));
-		return;
-	}
+	//if (err != 0) {
+		//LOG_L(L_ERROR, "[%s] couldn't get thread context within suspend signal handler", __func__;
+		//return;
+	//}
 
 	// Change the "running" flag to false. Note that we don't own a lock on the suspend mutex, but in order to get here,
 	//   it had to have been locked by some other thread.
