[Asterisk-code-review] Support ast_get_tid() on NetBSD (asterisk[master])

Jaco Kroon asteriskteam at digium.com
Thu Dec 16 00:23:33 CST 2021


Jaco Kroon has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/17707 )


Change subject: Support ast_get_tid() on NetBSD
......................................................................

Support ast_get_tid() on NetBSD

MichaƂ supplied me with this patch to submit.

Change-Id: If57fd3f9ea15ef5d010bfbdcbbbae9b379f72f8c
Signed-off-by: Jaco Kroon <jaco at uls.co.za>
---
M main/utils.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/07/17707/1

diff --git a/main/utils.c b/main/utils.c
index dc94c99..29676fa 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -36,6 +36,8 @@
 #include <unistd.h>
 #if defined(__APPLE__)
 #include <mach/mach.h>
+#elif defined(__NetBSD__)
+#include <lwp.h>
 #elif defined(HAVE_SYS_THR_H)
 #include <sys/thr.h>
 #endif
@@ -2659,6 +2661,8 @@
 	long lwpid;
 	thr_self(&lwpid); /* available since sys/thr.h creation 2003 */
 	ret = lwpid;
+#elif defined(__NetBSD__)
+	ret = _lwp_self();
 #endif
 	return ret;
 }

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17707
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: If57fd3f9ea15ef5d010bfbdcbbbae9b379f72f8c
Gerrit-Change-Number: 17707
Gerrit-PatchSet: 1
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211216/8285398d/attachment-0001.html>


More information about the asterisk-code-review mailing list