$OpenBSD: patch-main_utils_c,v 1.2 2021/12/10 11:19:51 sthen Exp $

Index: main/utils.c
--- main/utils.c.orig
+++ main/utils.c
@@ -2659,6 +2659,8 @@ int ast_get_tid(void)
 	long lwpid;
 	thr_self(&lwpid); /* available since sys/thr.h creation 2003 */
 	ret = lwpid;
+#elif defined(__OpenBSD__)
+	ret = getthrid();
 #endif
 	return ret;
 }
