Index: src/modules/module-rt.c
--- src/modules/module-rt.c.orig
+++ src/modules/module-rt.c
@@ -221,6 +221,8 @@ static pid_t _gettid(void)
 	long pid;
 	thr_self(&pid);
 	return (pid_t)pid;
+#elif defined(__OpenBSD__)
+	return getthrid();
 #else
 #error "No gettid impl"
 #endif
