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 e7943dd4d9)
This commit is contained in:
Brad Smith 2023-11-01 20:22:58 -04:00 committed by Asterisk Development Team
parent fb3067dd71
commit 089ddaaaed
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}