$OpenBSD$
--- src/zm_thread.h.orig	Wed Feb  3 19:30:55 2016
+++ src/zm_thread.h	Sat Apr  9 10:08:19 2016
@@ -35,7 +35,9 @@
 class ThreadException : public Exception
 {
 private:
-#ifndef SOLARIS
+#if defined(SOLARIS) || defined(__OpenBSD__)
+pthread_t pid() { return( pthread_self() ); }
+#else
 pid_t pid() {
     pid_t tid; 
 #ifdef __FreeBSD__ 
@@ -51,8 +53,6 @@ pid_t pid() {
 #endif
     return tid;
 }	
-#else
-pthread_t pid() { return( pthread_self() ); }
 #endif
 public:
     ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)pid() ) ) {
@@ -217,10 +217,10 @@ class Thread (protected)
 
     Mutex mThreadMutex;
     Condition mThreadCondition;
-#ifndef SOLARIS
-    pid_t mPid;
-#else
+#if defined(SOLARIS) || defined(__OpenBSD__)
     pthread_t mPid;
+#else
+    pid_t mPid;
 #endif
     bool  mStarted;
     bool  mRunning;
@@ -229,7 +229,12 @@ class Thread (protected)
     Thread();
     virtual ~Thread();
 
-#ifndef SOLARIS
+#if defined(SOLARIS) || defined(__OpenBSD__)
+    pthread_t id() const
+    {
+        return( pthread_self() );
+    }
+#else
     pid_t id() const
     {
         pid_t tid; 
@@ -247,11 +252,6 @@ class Thread (protected)
 #endif
 return tid;
     }
-#else
-    pthread_t id() const
-    {
-        return( pthread_self() );
-    }
 #endif
     void exit( int status = 0 )
     {
@@ -268,7 +268,11 @@ return tid; (public)
     void kill( int signal );
     bool isThread()
     {
+#ifdef __OpenBSD__
+        return( mPid != NULL && pthread_equal( pthread_self(), mThread ) );
+#else
         return( mPid > -1 && pthread_equal( pthread_self(), mThread ) );
+#endif
     }
     bool isStarted() const { return( mStarted ); }
     bool isRunning() const { return( mRunning ); }
