From 089ddaaaed1d2700a3621ffbd637cde4a6007988 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 1 Nov 2023 20:22:58 -0400 Subject: [PATCH] main/utils: Implement ast_get_tid() for OpenBSD Implement the ast_get_tid() function for OpenBSD. OpenBSD supports getting the TID via getthrid(). (cherry picked from commit e7943dd4d98e29760319c19e6200ba5ee3f5c7d5) --- main/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/utils.c b/main/utils.c index a31e467a1b..58ba1914f8 100644 --- a/main/utils.c +++ b/main/utils.c @@ -2763,6 +2763,8 @@ int ast_get_tid(void) ret = lwpid; #elif defined(__NetBSD__) ret = _lwp_self(); +#elif defined(__OpenBSD__) + ret = getthrid(); #endif return ret; }