From 69baef165c1cfd0f639d4230742e67ce7bee21dc Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 8 Oct 2023 11:38:59 +0200 Subject: [PATCH] hurd: Rather use hurd_thread_self This avoids a kernel RPC, and fixes port ref leak. --- src/modules/module-rt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/module-rt.c b/src/modules/module-rt.c index 5e30ac798..41ec9caad 100644 --- a/src/modules/module-rt.c +++ b/src/modules/module-rt.c @@ -36,7 +36,7 @@ #include #endif #if defined(__GNU__) -#include +#include #endif #include #include @@ -225,7 +225,7 @@ static pid_t _gettid(void) thr_self(&pid); return (pid_t)pid; #elif defined(__GNU__) - mach_port_t thread = mach_thread_self(); + mach_port_t thread = hurd_thread_self(); return (pid_t)thread; #else #error "No gettid impl"