SYS_gettid(2) returns the thread ID of the current process. Since that syscall
isn't implemented on OpenBSD, getpid(2) comes close enough.

--- src/goabackend/goalogging.c.orig	Mon Sep 26 14:45:46 2011
+++ src/goabackend/goalogging.c	Mon Sep 26 14:47:20 2011
@@ -207,7 +207,11 @@ goa_log (GoaLogLevel     level,
       break;
     }
 
+#ifdef SYS_gettid
   thread_str = g_strdup_printf ("%d", (gint) syscall (SYS_gettid));
+#else
+  thread_str = g_strdup_printf ("%d", (gint) getpid());
+#endif /* SYS_gettid */
   g_print ("%s%s%s.%03d:%s%s%s[%s]%s:%s%s%s:%s %s %s[%s, %s()]%s\n",
            _color_get (_COLOR_BOLD_ON), _color_get (_COLOR_FG_YELLOW), time_buf, (gint) now.tv_usec / 1000, _color_get (_COLOR_RESET),
            _color_get (_COLOR_FG_MAGENTA), _color_get (_COLOR_BOLD_ON), thread_str, _color_get (_COLOR_RESET),
