$NetBSD: patch-ad,v 1.3 2009/07/23 22:11:48 wiz Exp $

--- src/ptlib/unix/tlibthrd.cxx.orig	2009-07-05 05:52:48.000000000 +0000
+++ src/ptlib/unix/tlibthrd.cxx
@@ -250,7 +250,7 @@ PBoolean PProcess::PThreadKill(pthread_t
 {
   PWaitAndSignal m(activeThreadMutex);
 
-  if (!activeThreads.Contains((unsigned)id)) 
+  if (!activeThreads.Contains((uintptr_t)id)) 
     return PFalse;
 
   return pthread_kill(id, sig) == 0;
@@ -259,8 +259,8 @@ PBoolean PProcess::PThreadKill(pthread_t
 void PProcess::PXSetThread(pthread_t id, PThread * thread)
 {
   activeThreadMutex.Wait();
-  PThread * currentThread = activeThreads.GetAt((PINDEX)id);
-  activeThreads.SetAt((PINDEX)id, thread);
+  PThread * currentThread = activeThreads.GetAt((uintptr_t)id);
+  activeThreads.SetAt((uintptr_t)id, thread);
   activeThreadMutex.Signal();
 
   if (currentThread != NULL) 
@@ -393,7 +393,7 @@ PThread::~PThread()
     if (id != 0) {
       process.activeThreadMutex.Wait();
       pthread_detach(id);
-      process.activeThreads.SetAt((unsigned)id, NULL);
+      process.activeThreads.SetAt((uintptr_t)id, NULL);
       process.activeThreadMutex.Signal();
     }
 
