aboutsummaryrefslogtreecommitdiff
path: root/htl
diff options
context:
space:
mode:
Diffstat (limited to 'htl')
-rw-r--r--htl/cthreads-compat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/htl/cthreads-compat.c b/htl/cthreads-compat.c
index 55043a8..2a0a95b 100644
--- a/htl/cthreads-compat.c
+++ b/htl/cthreads-compat.c
@@ -25,8 +25,9 @@ void
__cthread_detach (__cthread_t thread)
{
int err;
+ pthread_t pthread = (pthread_t) (uintptr_t) thread;
- err = __pthread_detach ((pthread_t) thread);
+ err = __pthread_detach (pthread);
assert_perror (err);
}
weak_alias (__cthread_detach, cthread_detach)
@@ -40,7 +41,7 @@ __cthread_fork (__cthread_fn_t func, void *arg)
err = __pthread_create (&thread, NULL, func, arg);
assert_perror (err);
- return (__cthread_t) thread;
+ return (__cthread_t) (uintptr_t) thread;
}
weak_alias (__cthread_fork, cthread_fork)