]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
main/utils: Implement ast_get_tid() for OpenBSD
authorBrad Smith <brad@comstyle.com>
Thu, 2 Nov 2023 00:22:58 +0000 (20:22 -0400)
committerBrad Smith <brad@comstyle.com>
Tue, 7 Nov 2023 12:56:17 +0000 (12:56 +0000)
Implement the ast_get_tid() function for OpenBSD. OpenBSD supports
getting the TID via getthrid().

main/utils.c

index a31e467a1b039570ea59527af6dfac0482f5507b..58ba1914f8572cfaa4c62740e55f0ced047ec5b6 100644 (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;
 }